How to match the data and display in message box

Hi Folks,

i am looking for logics, kindly help me with the logic.

What i have done is:
First i have stored all the values in a single variable(used get text activity and store the value into different variable and then used assign activity to store all the variable into a single variable)
what i want to do is:
i have one excel sheet which is connected to database, now i want match the value in excel sheet with the value stored in a single variable. if matches show in message box if not display no matching record.
Note - i have passed the excel sheet and read the range and stored in output variable.

Thanks in Advance

Hi @Rakesh_Tiwari,

What you can do now is to filter the Datatable for the value and then check if you have 0 or more then 1 line and then you can have the different messages in an If Statement

Hi @Gabriele_Camilli,

i didn’t get you. as i have dynamic row in the data table, every time the data come from get text activity will be different, and i want that bot should search for those data only and display it.

Any suggestion?

So let’s go step by step of what i understood and tell me if there is something i misunderstood:

  1. You get an excel sheet into a Datatable
  2. You want to find the value of a variable in this Datatable
  3. If you find a match you want to have a message, if not you want an other message

Is this correct?

yes correct

So by using the Filter Data Table Activity you can search for the value in the dynamic DataTable you got in step 1. You may find 0 or 1+ Rows.

By counting the Rows of the DataTable you can then decide in an If Statement what message to show

how to achieve it through filter data table can you please explain?

before that i believe i should explain you the process.

i have one data table with lot of row value which is dynamic on each iteration.

then, i need to scrap the text value once it clicks the each row of web table

then again need to store the value in one variable so that i can compare that value with the excel datatable , if matches then display and if not then also display.
Thanks

why not use look up range activity,
You can search for value to exist in excel or not by checking if it gives any output cell value or not and based on that you can show the message box

Hi,

can u please explain how would i achieve it and i hope you understood my requirement?

Well what I understood is the there some value in variable X and you want to check if this value exists in your Excel.
If yes then message box -> value exist
Else -> not exist

Lookup range will take the text to check in excel as an input and if it finds any cell with similar data will give the cell address string as output
Now if output.length > 0 -> value exists
Else -> not

And if it’s connected to database , then instead of using excel why not just run sql query to check for rows where value is same that will be fast

ok, can you write a code snippet for that so that i can implement on my code.

Hi,

in my case it doesn’t give the cell value as a result.

what i have done is i passed the variable in lookup Range activity.

Any suggestion?