i Data Scrap a Drop down Box and managed to get all the Data from the List. These List are basically Dates.
I have assign 2 Variables. The First variable has a fix date of “01-Sept-2019” an the second variable is read of from a Data Table where i have scrap the data. The sequence will will loop reading of the Data Table and comparing it with the First variable.
On my IF Condition I have done the logic in this manner:-
(varDateFind.Equals( row.Item(0).ToString))
What I am trying to accomplish is to check if the first fixed variable with the date “01-Sept-2019” is equal to the Date that is in the Data Table.
If it “YES” then it Display a Message “Found” and if “NO” then display it display a message “NO”
i can display the message count which show’s 5 which means there are 5 rows that i have Data Scrape.
I managed to also display the contents of the Data Table but some how my IF Logic is not working when I do the comparison. Below are my flows.
Thank you for pointing that out. The search work well now. Not sure how I can miss that out
Now the output on the Message box shows Found. I not sure how to get the row number where the both variable are the same. i have tried the flow below but its showing “0” when found.
Below is the flow. Can you please assist in how i can display that Row number?
@subasc - Can you try with
1 - Log the row.Item(0).ToString before if condition - to check the value
2- varDateFind.Contains(row.Item(0).ToString)
or
varDateFind.ToString.ToLower.Contains(row.Item(0).ToString.ToLower)
Just to update you and everyone else, I have push the message to the output screen and it detects the Date that I am trying to look for in the Data Table with a “True”.
As you can see your solution worked. The Date “01-Dec-2019” is on the 3rd loop as such I want the system to give the number of loops it went through to detect that Date that I am searching for. For this example is loop 3.
I have use a IF activity but it is giving me an error. I am not sure if this is the way to go to obtain the the number of loops. In the IF activity i tried to detect if it contains the “True” as shown on the output screen and if it does come out of the IF activity and write the Counter value.
pls change the variable varfoundcount type to Boolean…
in if condition just check varfoundcount
no need to write contains statement for boolean variables