Column names display when using activities inside FOR EACH ROW activity

Hi Team,

Whenever we are using a assign or any activity inside a FOR EACH ROW activity we will be using either the ColumnName or column index of any of the column in that datatable to access any specific Datarow-Datacolumn value

If the number of columns is less it’s easy to remember the column name or column index so that we can mention that along with CurrentRow(“yourcolumnname”)

But if there are hundreds of column, it is tough to remember the Exact name of the column
So it would be great if we can list down all the column names the moment when we are using CurrentRow or calling any Datarow inside FOR EACH ROW activity

This will reduce the usage of wrong name of columns and also saves time and no need to remember column names or it’s position

Cheers

2 Likes

While it would be convenient, I don’t see how this feature would be feasible to implement since we can only be sure of the column names during runtime.

E.g. if we have the following sequence:

1. Download Excel file from a website.
2. Read Excel file into a datatable dt.
3. For Each Row in dt
4.   CurrentRow("

At step 4, UiPath Studio would need to list all the column names but without running the code there’s no way for it to know that.

I m just wondering if this can be added as a feature like how we have for SELECT ITEM activity

@ptrobot

I guess you could implement it halfway by getting the column names from e.g. the Build Data Table/Extract Structured Data activity. But even then we can’t be sure of the column names at design time, since the user might have added code to modify the data table (filtering out columns, renaming columns, adding columns, etc.).

1 Like

What @ptrobot says is a valid blocker for this to happen on the native data tables.

But just for the record, this scenario:

1. Download Excel file from a website.
2. Read Excel file into a datatable dt.
3. For Each Row in dt
4.   CurrentRow("

Is already possible :slight_smile:

Either way, it is up to the Studio team to have a look now and see if we could replicate similar behaviour. But as you can see above, you do need a sample Excel file to allow Studio to recognize the columns, which would most likely also be needed to make it work for Data Tables.

1 Like

I was thinking of scenarios where the Excel file is not available during design time. And also cases where the downloaded Excel files might have different column names. In those cases suggesting column names might even be misleading.

2 Likes