Desired output from datatable


I have one input in_insured, I have to refer above dt and see if this input is available in column ‘insured’ of dt and if yes I have to get the values in column for same insured from the dt

Hi

We can try with Lookup datatable activity

Where
—first use a EXCEL APPLICATION SCOPE and pass the filepath of the excel and get the output dt as variable using read range

—now use a LOOKUP DATATABLE activity and mention these in property panel

input datatable - dt
Input value - CurrentRow(“yourcolumnname”).ToString

Lookup column name - “insured” mention that exact colname

Target column name - mention the target columnname from where you need the value

Cellvalue - create a variable which will give you the value as string

Hope this would help you resolve this
For more details on how to use a lookup datatable

Cheers @sheetal_Bora

Getting error current row not declared

What is the variable name in your for each row activity
Use the same and not currentrow

@sheetal_Bora

It worked I got output (cell value)as AC,CI,HI just want this in form of array of strings

Great you can split it like this if they are separated with commas in between

str_array = Split(inputstring.ToString,”,”)

Cheers @sheetal_Bora



This way I m getting the output

1 Like

Mention like this in writeline activity
string.Join(“,”,ListOfProducts.ToArray())

Cheers @sheetal_Bora

String.Join(",", str_array) can b used for outputting the array
Bit also try to do some checks within debugging and locals/watch /immediate panel as this is Best Practice for developping instead msg Boxes

Is this working fine
@sheetal_Bora

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.