How to check if all the items in an array exist in a data table?

datatable
uiautomation
activities
variable

#1

Hi everyone,
Firstly, You people are doing a great job. I am new to uipath and this forum has helped me a lot to solve numerous problems.Thank you so much :upside_down_face:

Coming to my issue,I have an excel which consists of 2 columns: “Order no” & “Services” and has some data like below:
|Order No|Services|
|91955|S01 S05|
|571438|S91 S92 S39 S36 S01|
|829642|GUD27E KHJJ90HP1 S34 S29 S116 S225|
|177257|D1JHKVB|
I have a unique list of “Order No.S” and some “Services” associated with each order no are in the next cell delimited by spaces(Eg: S01 S05…).
My requirement is to search for each “Order No” in a web portal and grab the “Services” details from there to a data table.The data table will also consist of 2 columns “Services” and “Status”.For example, If i search for Order No “91955”,The web result will be something like this:
Services|Status
S01|PERFORMED
S05|CANCELLED
S93|PERFORMED
GHKLKJ465|REFUSED

Now,I need to check if all my services in the excel(Eg: S01 & S05 for order 91955 in this case) exist in data table Column 1:“Services” and if the match is found,then i need to grab the Column 2 :“Status” for that particular “Service”.
As of now, i plan to split & put the cell values in to an array and then i will check each array item against data table rows.
I am clear with how to put cell values in array.I have problem with the later part i.e; matching against the column 1 of data table and grab column 2 value on match!!!
Please help me on how to proceed?

Any help will be appreciated! :slight_smile:

Thank you in advance! :slight_smile:


#3

Hi @puja_padhy,
If possible , can you please attach the xl sheet.

Regards
Balamurugan


#4

This is a sample of my excel sheet.The raw_data is my input.And the myDT<order_no> is my datatable.
Trials.xlsx (11.9 KB)

Thanks,
Puja