How to Search Data and Fill in According to Conditions

I want to fill in the data from the source according to conditions, how can i do in Uipath?
the data which will be filed
data

the data source

the result
finaldata

1 Like

Fine
Hope these steps would help you resolve this
—use a excel application scope and pass the file path data source as input (second image)
—inside the scope use a read range activity and get the output with a variable of type datatable named dt1
—now use another excel application scope and pass the file path as input for the excel where we want to enter the data (first image)
—use read range and get the output with a variable of type datatable named dt2
—now use a for each row loop and pass the variable dt1 as input and change the variable name from row to row1
—Inside the loop use another for each row loop and pass the variable dt2 and change the variable name from row to row2

—the use a if condition like this
row1(0).ToString.Equals(row2(0).ToString)
If the condition passes it will go to THEN part where we can use a assign activity like this
row2(1) = row1(6).ToString
And another assign activity
row2(2) = row1(7).Tostring

And next to these two assign activities inside the THEN PART of if condition use a BREAK activity so that it will stop to loop again and again inside the for each row once after match is found

Hope this would help you
Cheers @fightblue

it works, thank you very much

1 Like

Fantastic
Cheers @fightblue