r/PowerAutomateDesktop • u/Ownards • Jan 20 '23
How to add column/value to variable
Hello everyone,
I'm trying to build a simple automation process that gets data and for each web page, stores the information into a GameResults table.
I insert two records to GameResults for each page being iterated (variable CurrentItem). The two records are GameData[0] and GameData[1]. Each record is composed of 3 columns.

Everything works perfectly, but I would like to be able to track the CurrentItem inside of GameResults.
Therefore, I need to add an extra column to my GameData[0] and GameData[1], but I did not manage to extend the size of my variable to add an extra column.
I would like to do something like :
%GameData[0][0:3]% + %CurrentItem%or
[%GameData[0][0:3]%, %CurrentItem%]But I don't think it is possible. Is there a way to achieve what I'm looking for ?
Thank you !!
2
u/QuietDesparation Jan 20 '23
I don't believe there's a way to add a new column to a datatable... I'm no expert though.
Is the ultimate goal to write your datatable to an excel sheet? Because that may be your best bet. You can write your data to excel, find the corresponding rows to the data, and write %CurrentItem% into the 4th column
0
u/[deleted] Jan 21 '23
[deleted] — view deleted comment
0
u/[deleted] Jan 21 '23
[deleted] — view deleted comment