How to compare gettext out put with data table

Hi All,

I will get Response message in web site Iam Getting the text using get text activity. I want to compare the values from get text output to datatable.

Response.txt (486 Bytes) excel.xlsx (8.0 KB)

Example :- In get text out put i have 5053347893 telephone number i want to check with same telephone number exist in excel as well and update status

Please help me.

@thima

The response which you shared is a xml file, I believe it is not the full file

Get Text if you get the output as 5053347893, the store this into a variable

and follow as below
https://forum.uipath.com/t/tutorial-how-to-check-a-string-is-present-in-excel-sheet-part-1/243696/2

You can check others without using the Foreach loop

Hope this helps you

Follow Link

Thanks

This is not working

@thima

Can you share the workflow which you are trying?

and also what issue you faced?

Thanks

sampleprocess.zip (17.8 KB) Response.txt (1.9 KB) excel.xlsx (8.0 KB)

Hi @thima use lookup datatable activitiy for it to check whether the number exist in excel file

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

Can you please share some sample workflow

Hi @thima, what is the response.txt file?

Hi @thima, check this one:
Main.xaml (6.0 KB)

Mark it as solution if you got it

Regards

Nived N
Happy automation

Yes Nived response is in text file I want to compare log message response with excel column value telephone numbers and extract status.

Regards,
Hima

How we can compare it both by what way ?

 Create Variable (Ex: GetNum) in the Output of Property of Get Text Activity.

 Use Read Range Activity (Workbook) for getting all phone Number from Excel. Ex:

 Give your Excel Path in Read Range Activity and Sheet name of Your Excel Sheet (i.e. "Sheet1”) and Range become Empty.
 In Property Section of Read Range Activity, Check on Add Headers and Create one variable and his Variable Type is “System.Data.Datatable” type(i.e. dtPhoneNum)
 Use another read Range Activity with different output name (i.e. dtNum). (Note: All field same as above Read Range Activity except Output Variable Name).
 Use Clear Data Table Activity and put datatable Name(i.e. dtNum) in Input of Property section of this Activity.

 Use For Each Row Activity for using all Phone Number coming from Excel and then we will compare with our Get text.

 Put your DataTable Variable Name (i.e. dtPhoneNum ) in Input of Property Section of for Each Row Activity.
 Use If Activity inside Body part of For Each Row Activity to check condition i.e. phone Number same or Not.

 Condition is “row(0).tostring=GetNum” So If this condition true then Move to Then Part otherwise move to Else Part.
 Use Add Data Row inside Then Part of IF Activity and put this {row(0),”Success”} inside Array Row of Input of Property and also put Name Datatable Variable Name which we use in Clear Data Table Activity.(i.e. dtNum)

 Same Add Data Row Activity in Else Part also except in Property in ArrayRow is { row(0),”Failed”}

 At End, Use Write Range Activity for update Excel.