Hello All,
I want to compare multiple values from web using (get text activity)…with excel columns…
now i am using separate if condition for all the values.… so i want to use only one if condition for all the values…
Thanks,
Suresh.
Hello All,
I want to compare multiple values from web using (get text activity)…with excel columns…
now i am using separate if condition for all the values.… so i want to use only one if condition for all the values…
Thanks,
Suresh.
yes your are correct
@suresh_kumar4
try using this inside the if condition. If the get text value is present in your excel sheet, it will return true and perform the “Then” part else it will perform the “Else” part
yourDT.AsEnumerable().Any(Function(x) x(“Column1”).ToString = GetTextValue)
Replace column1 with the excel column that you are comparing with.
Thanks understood…if i have one column let say column1 then its fine…here i have so many columns,
column1 = gettext1
column2 = gettext2
column3 = gettext3
column4 = gettext4…
so i want to compare this whole thing in single if conditon.
hope you understand…
Thanks,
Suresh.
Fine
Let’s take like you are getting the text from web with GET TEXT ACTIVITY and is stored in a variable named strinput
—now use a OUTPUT DATATABLE activity and pass the datatable variable as input and get the output with a variable of type string named str_output
—now use a IF condition like this
str_output.ToString.Contains(str_input.ToString)
If true it will go to THEN part or goes to ELSE part
Cheers @suresh_kumar4
Does your data contain comma?
If not, you can try this:
Finally use following code to check whether the data exists in excel or not.
ExcelDTString.Contains(CombineString)
Thanks for your reply… i am not getting it… can you please elaborate…
Thanks.
Thanks,
Suresh.