Read specific items in a CSV file

Hi all,

Not sure if there’s a related topic/solution to my query.

I’m trying to read off of a .csv file and it will only get those that have a JL prefix under the PO No. column. If there’s match, it will get the entry/ies under Descript.
image

There can be none to multiple line items. If there is none, however, I’d like the code to loop back to the beginning.

Appreciate your help.

Rojem

Hi,

I’ m not sure if loop is correct when you have multiple records. So instead you can first try by
reading csv
Filter datatable with pl.no only starts with JL and in output you can have the required columns alone like pl.no , describ.

@RojemMolina

  1. Use Read CSV file activity to read the data from CSV file and it will give output as DataTable. Let’s say ‘InputDT’.

  2. And then use For Each Row activity and pass InputDT to iterate one by one row from it.

       If row("PO No.").ToString.Contains("JL")
       Then
           varDescript = row("Descript").ToString
           Next Actions you want to perform
        Else 
            Log Message

Hi,

Can you try to use FilterDataTable activity as the following?

Regards,

Hi @lakshman ,

When I tried yours, it’s returning an error.

@RojemMolina

Remove If from that expression in If activity.