Dynamic Join columns

I need to perform join and the number of columns which are to be used in join activity are unknown, unknown means user will provide that in reference to how many columns join need to be performed.

like in screenshot columns given are two but if three columns are given then there need to be third row as well in join command , so this part need to be automated that if user gives one column name then only one row is to be used to join and if user gave 5 columns then join has to be performed in 5 columns.
I hope the query is clear if not then please let me know.

Join datatable activity is not ready for dynamic join cols. You can do following:

  • create a combined join col in advance on the fly with an additional datacolumn and its Expression (Datacolumn.Expression Property)
  • check if LINQ can serve

With more details on your join scenario we maybe can also check for another alternate approach

Hello Peter
Sorry but Combined columns part I did not get, like merging two columns in one column .

merging / combining on a helper column - a workaround we do for simulating dynamics on join cols

Could you please share the query which we use to combine columns , The query which I know only combines two columns but here in this case the no. of cols is dynamic


Option: JoinCol Datacolumn Expression

hava a sample data like

and an array with the current JoinColumns, which can dynamic created

then we can dynamicly generate the helper column Expression string:

and set it as Expression to the helper column

As you see in the flow:

with the help of expression the helper col is filled / populated wthout any loop in one go


after setting the expression

with the conversion to string we also handle different datatypes

Option LINQ / ForEach

just fill up the helper col before joining. populating the helper col can also be dynamized


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