Search for a specific value in a column (CSV file) & put out the related value of another column

Hi guys,

as a beginner, I already did some automation regarding UI interaction.

Working with data tables is something, I’m not familiar with yet.

Here’s my issue:

I have a CSV-file with two columns.

I want uipath to check, if it finds a specific variable in the first column and if it does, i want it to give out the related value from the second column, so I can set this value to another variable.

What is the easiest way to do so?

@slink

For each row loop for your datatable
    if row.Item("Column1 Name").ToString = <<variable>> (assuming it is strings we are dealing with)
    Assign <<variable2>> = row.Item("Column2 Name").ToString

See the attached code. The example takes a CSV of foods and “eats bananas” by setting the state of the second column to “Eaten”.

Processusvierge.zip (7,7 Ko)

@slink Welcome to uipath community
use datatable activity , for each and to get any item from row , we can use row(“NameOfColumn”).tostring or row.item(“NameOfColumn”) , use if else activity at end.
Hoping it works