How to Select Multiple Specific Columns from the Data Table

Hi Everyone,

I am trying to get the Specific Columns and its entire data from the data table.
Can any one please help me to understand how to use the select method for this scenario.
Only required Opportunity, Customer, Type, Status, Owner,

Is it possible through the Select method?

Thank you in advance

Regards
Vishnu

Refer the below link

2 Likes

Hi @winningvish

Yes it is possible through the select method below -use the datatable that you get from reading the excel sheet and loop it through for each row with using this

dt.Select(“[Opportunity]”+" “+”[Customer]“+” “+”[Type]“+” “+”[Status]“+” “+”[Owner]")

or you can also achieve this using column indexing
use the counter pass in the rows value
dt.rows(0)(0) like wise— dt.rows(0)(1)

Regards
Srish

3 Likes

Hi,

You can use the filter data table activity…

2 Likes

Hi @srishsai

Thank you for your quick reply. I am trying to store into Data Table variable but getting error. also tried to store in Data Row but no luck.

How can I use Column Indexing would you please more elaborate on that if you don not mind.

Regards
Vishnu

1 Like

Hi @Ramashita

Data table filter will work to get the specific rows after filtering data I think.
Please correct me if I am wrong.

Regards
Vishnu

@winningvish - you can add filter data table activity …

1 Like

What if the column index is not same? how will you get the value a particular column from a selected row of a data table?

Initially i tried this syntax: x = Datatable1.Select(“[Column_Name] ='” + Column_Value.ToString+“'”)(0)(108)

But the problem in it is column index is changing, how to make it dynamic?

Please provide me the syntax for this condition

Regards
Sreekanth Reddy

1 Like

Use ‘Filter Datatable’ activity & go to ‘Output Columns’. Mention the column indexes here which you want to keep or remove. It will work well.

1 Like

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