[resolved] Count number of rows in a file and sent the total in an email
Hello, I am trying to count the number of rows in a file and send that total in an email. So far my approach has been to use a tAggregateRow on the tFileOutput to get the count. Is there a way using tSetGlobalVar to get the count value from the tAggretateRow and insert that into the “Message” section of the TSendMail? My layout is as follows tFileOutput -> tAggregateRow -> tSetGlobalVar -> tSendMail If this layout will work should the Value under tSetGlobaVar be set to something like “tAggregateRow” Thanks
Re: [resolved] Count number of rows in a file and sent the total in an email
Hi, You don't need to use the global variable. You can put in the tSendMail the value straight from tAggregateRow/tFileRowCount using following format: output_name.output_column_name (for example row1.count_rows). If the returned count value is Integer you need to convert it to string String.valueOf(row1.count_rows).