For loop inside Assign

Hi there,

I was recently researching for something else and I found someone doing it …
I tried to find it now, when I need it (as usual :smiley: ) and I couldn’t so, I decided to dedicate a post.

I would like to insert a For/For each loop inside an assign activity, something like this:

This is an example where Im trying to get all the column names from a dt and directly convert it to an Array variable

Do you know the syntax?

Thank you in advance family!

We can do it with LINQ

Method Syntax
dtData.Columns.Cast(Of DataColumn).Select(Function (x) x.ColumnName).toArray

Query Syntax:
(From c in dtData.Columns.Cast(Of DataColumn
Select n=c.ColumnName).toArray

1 Like

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