How to check if an item exist in a saved list in excel?

I have a saved list of approved users in an excel document as such; First Name, Last Name, Email address. I want to check if a requester for service is on the list or not. The requester could submit his/her Name or Email. If the requester is on the list, then I want to proceed with the automation workflow but if no, then stop the workflow.
For checking the requester, I created an Excel Application Scope to fetch the excel file. Then use a ‘Read Range’ activity to read the data and output as a variable called ‘ApprovedList’ of DataTable type. Then added a flow decision activity with condition as - ApproversList.ToString.Contains(Requester). I read the requester information from a form and then store the value as variable called Requester. The automation does not seem to work. I would appreciate help on this.

Hi Aoladipupo,
You have to check both the name and email to filter your records for Requestor.
You can Use LINQ queries to filter and based on the outcome you can proceed.
For LINQ you can chech this URL Filter DataTable in UiPath Studio (finessetalks.com).

I have attached a workflow using try catch for your reference,you can use if to handle the same as well.
You can go thru this workflow for your problems solution
Main.xaml (10.5 KB)
Approvers.xlsx (10.5 KB)

If you still face any issues,plz let me know.

Thanks,
Geetishree Rao

1 Like

Sequence2.xaml (23.2 KB)
Forum.xlsx (9.6 KB)

Hi @aoladipupo

Try this hope it helps :slight_smile:

1 Like

Thanks @gRao

1 Like