I have a web form like this
first I will click to click on the “Group by” form
After clicking on the form, data will appear like this
then I have an excel file containing SKU, Service columns
each column contains data like this
Now I want to create a UiPath flow, if the “SKU” and “Service” columns contain the value “Yes” then the robot must select “SKU” first and run another workflow. After that, the robot selects “Service” and carries out its workflow
But if the “SKU” or “Service” column contains the value “No” then the robot will not select the column containing the value “No” only executing the one containing the value “Yes”
How to create such a workflow and loop? Can I use array variables?
Hi @Kia1 , You don’t really need an array for that:
(Edit: To add the 2nd condition mentioned about the 2nd column")
Use a For Each Row activity to iterate through the Excel
Inside the For Each Row, insert an IF Activity
Note that inside the For Each Row activity, you will be able to access each row with a default variable that the activity creates, of type DataRow, named CurrentRow
Your IF Condition will be the following: CurrentRow("SKU").ToString.Equals("Yes") AndAlso CurrentRow("Service").ToString.Equals("Yes")
That will return True if the text on both cells is Yes, and will return False if the text on any cells is No.
Then, based on this, on the If Activity you will fill whatever actions you need, knowing it will take one path if the text is Yes, and the other if the text is No.
I understand that you need to select the SKU Option, correct?
If so, you are using the wrong data in the Type Into, as CurrentRow(“SKU”) Will write “Yes” on your filter, instead of SKU, as this is the value coming from the excel.
Since you want to write “SKU” instead of “YES”, you should not use CurrentRow variable.
Inside the “Then” segment, we know that both SKU and Service Contain a Yes, therefore I’d have a sequence with the following:
1- (Already done) - Navigate to the Then by having both values set as Yes
2- Type into filter “SKU” and click on it
3- Clear Filter Text and write “Service”, then click on it
This way when both of the values in the excel are Yes, the bot will select them both in the list.
Hope it made sense
If you can send us the zipped code, we might be able to help a bit more, can be done by Zipping the project folder and uploading it from here: