Hi @dominono9
You can build a flow as shown below:
Here, first I have created a data table with the column headers using the following expression in a 'Set Variable' action:
%{ ^['Column 1', 'Column 2', 'Column 3'] }%
Then, I split my text into a list with New Line as separator using a 'Split Text' action to create a list with each of the row elements in the text file:
Next I iterate within this list element and the again use a 'Split Text' action for splitting the current row item with a comma separator:
For each iteration I will get a list called as TextList as shown below:
Now, in the end I just use a 'Set Variable' action again to add a new datarow consisting of all the items in the newly generated list to my original data table variable with the following expression:
%DataTable + [TextList[0], TextList[1], TextList[2]]%
My final output is as shown below:
------------------------------------------------------------------------------------------------------------------------------
If this post helps you with your problem, please mark your as Accepted solution. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------------------------------
Use loops, string functions, split, etc on your textlist variable.
You have to form a string like %{ ^['ColumnName1', 'ColumnName2'], ['1', '2'], ['3', '4'] }%
And then pass it to Set variable
The output of this set variable will be a datatable
Hi @dominono9
You can build a flow as shown below:
Here, first I have created a data table with the column headers using the following expression in a 'Set Variable' action:
%{ ^['Column 1', 'Column 2', 'Column 3'] }%
Then, I split my text into a list with New Line as separator using a 'Split Text' action to create a list with each of the row elements in the text file:
Next I iterate within this list element and the again use a 'Split Text' action for splitting the current row item with a comma separator:
For each iteration I will get a list called as TextList as shown below:
Now, in the end I just use a 'Set Variable' action again to add a new datarow consisting of all the items in the newly generated list to my original data table variable with the following expression:
%DataTable + [TextList[0], TextList[1], TextList[2]]%
My final output is as shown below:
------------------------------------------------------------------------------------------------------------------------------
If this post helps you with your problem, please mark your as Accepted solution. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------------------------------
Thank you very much. I Understand!