In image If I give “Id” value , it should Fetch all the corresponding data.
I have Used Dictionary and collection. I am new to Uipath Please Help me.
Hello Dharma,
Please see the answer to this, it is essentially the same thing just with a single condition instead of a compounded one. You would specifically be checking whether Row("Id").ToString = "1562"
in that case.
Hi @tejach412,
you can try in below way:
yourListVar= (From row in yourExcelReadDataTable.AsEnumerable() Select Convert.Tostring(row(“Id”))).ToList()
it will return you a list with all the values from column “Id”
Hello Deepak,
Thanks for reply, My problem is id i give Id ex:1562, It should fetch that entire row data like last name ,Gender, country,First name,Data.
@tejach412
Use Yourdatatable.AsEnumerable().Where(Function(x) CStr(x("ColumnName")).ToString.Trim.Equals("Value"))
this will give you entire row.
Regards
Ok.
There is another way …
Create on seachIdVariable and assign any id value to it. Ex.1536
Create on datatable newDataTable and assign as below:
newDataTable=yourExcelReadDatatable.select(Convert([Id],System.string)=‘“+seachIdVariable+”’).copyToDatatabale.
This will fetch all the the column values based on the searchIdProvided .
From sample below, you can get entire row as object array, and can be show in text.
- Read Range : “excel file” to DataTable Object as name = dt_Sample
- Assign : dr_Sample = dt_Sample.Select(“Id = ‘1513’”)
3 .Log Message : " Found Match DataRow(" + dr_Sample.Length.ToString + “) : First Row(” + String.Join("; ",dr_Sample(0).ItemArray) + ")"BlankProcess.zip (13.2 KB)