1.robot has to check in database if entered value exists in a row. (it should check row by row I guess.). there are two options it exists or don’t.
if input matches with the info in database robot sends email with the information from that row.
if there is no match in any row than must send only one informational mail.
I don’t know what i am doing wrong but it checks only first row ))))
You are checking the values outside the loop, so it will check for only one value . place the decision box and the process you want to do in the loop @meshvela. That will check for all rows
May be the value you are getting in the datatable is not same as the one you entered, please try a message box before the check decision @meshvela , one more thing is, instead of decision box, use if condition so that it will be easy to understand
I used If condition but in this case It was sending one email for each row when it was not matching for example if there are 30 rows and it matches with one row it should send 1 email that there is a match and if there is not a match it should send 1 informationa email that there is no match. but instead it is sending 29 mails that there is no match and one that it is matching
Hi
Welcome back to uipath community
Hope these steps would help you resolve
—use a database activity like EXECUTE QUERY and get the output as a datatable variable named dt
—if the inputs is in a variable like under name str_input the use a for each row loop and pass the above datatable variable as input
—Inside the loop use a if condition like this row(“yourcolumnname”).ToString.Equals(str_input)
If true it will go to THEN part where we can send a mail with that row information or it will go to ELSE part where we can send only the information we need
Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @meshvela
@indra thanks for your response but flow decision condition is not valid. also I need to get exact row if there is a match in mail. Is there possibility to somehow extract the row for mail message?
@indra It almost works the way I want. I just wounder can message box (later i’ll change by email.) somehow give the result row? now message box just gives Result (for excample A10) and i want to give content of the rowMain.xaml (19.5 KB)