cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anjali_Rani
Helper II
Helper II

To create DataTable in Power Automate Desktop

Hi everyone,

 

Can any one tell me ,

1) how e can add Datatable activity in Power automate desktop, ?

2) How we can store in dadatble variable, so that finally we write that variable into ExcelFile?

3) How to convert variable to Datatable?

 

 

 

 

Please help me!!

I have to store value in Excel file,Any suggestions/Hint will work.

 

Please give suggestions.

Thanks in Advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ryule
Super User
Super User

Information on creating your own DataTable is located under "Datatable" under Advanced Data Types in this link:

 

https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-data-types#advanced-data-type...

 

I, however, have not discovered a way to insert a variable into a custom datatable....so if anyone knows how to do that, I'm all ears. I've had to use Excel as a workaround, like you had mentioned.

View solution in original post

12 REPLIES 12
ryule
Super User
Super User

Information on creating your own DataTable is located under "Datatable" under Advanced Data Types in this link:

 

https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-data-types#advanced-data-type...

 

I, however, have not discovered a way to insert a variable into a custom datatable....so if anyone knows how to do that, I'm all ears. I've had to use Excel as a workaround, like you had mentioned.

Thanks, This helped a lot.

 

Thank you so much. 🙂

Use %vData + [rowd, rowdd]% where rowd , rowdd are variables and vData is datatable.

korebreach2022
Regular Visitor

The key to using variables to set items in a datatable (which makes little sense) is to remove the % signs from both ends of the variable.  Where you may think that %MyTable + [%variable1%, %variable2%]% would be correct, it's actually %MyTable + [variable1, variable2]% .  This is a strange quirk of the engine because if you enclose the variables in % signs (like you would do anywhere else) PAD will try to "pair" the % at the start of the first variable with the % at the start of the statement, essentially making a variable called, "%MyTable +[%". The information following that incorrect variable is then interpreted as garbage so it throws an error.

ryule
Super User
Super User

Yes I have since discovered that; thanks! And I just saw they introduced some new DataTable actions, but haven't checked them out yet!

https://powerautomate.microsoft.com/en-us/blog/power-automate-for-desktop-july-2022-update/

hoernchen
Frequent Visitor

Hi all, I have checked it out and I did not manage to add data to a data table row. Which format is needed to do that? My tries with a defined table of 4 colums were:

2022-07-28 11_58_17-Window.jpg

 

  • 1,2,3,4
  • 1;2;3;4
  • "1";"2";"3";"4"
  • '1';'2';'3';'4'
  • 1+2+3+4
  • ['1'] + ......... 

Any info how to solve that?

 

@microsoft colleagues:

  • Would be great if those infos will be added directly to the info button next to each step, it's always a try and error
  • There's an option to delete a row, why isn't there a option to delete a column as well?
ryule
Super User
Super User

I 100% agree with you that you should be able to insert new data directly into the table. I haven't figured out how to do it using these new Actions.

I did discover you can insert a row into the datatable with a list, as long as the list has the same amount of rows as the datatable has columns.

So for instance, below, I created a list with 3 rows of values, and then created a datatable with 3 columns, then inserted the list as a row, and it worked....

ryule_0-1659025555454.png

 

You came pretty close with your last try. It should look like this:

JCiriello98_0-1659721281904.png

So the format for a datarow is a comma separated list contained by square brackets inside of percentage signs.

Note how ColumnNVariable are variable names containing the values DataN, while 'Data3' and 'Data4' are hardcoded values contained in single quotes.

 

This is what the datatable looks like after the insert step has run:

JCiriello98_1-1659721497901.png

*I created the datatable with the InitN values already there before the insert happened.

See my response to hoernchen above on how to insert a row to a data table without making a list first.

can't believe i never tried that combination; nicely done, thank you!

Niraj466
Helper II
Helper II

what @JCiriello98 mentioned, that works. However, it doesn't make sense to have first row (row 0) must be available. I'm appending dynamic rows and this row 0 was required to delete at later step. 

 

I followed the older method using Set variable to create data table.

 

Niraj466_0-1660666443454.png

 

However, I'm seeing that the column name are not actually created what I mentioned as list. If we see, I used '_' (underscore) for the columns names : 'Queue_Name', 'Row_Id', 'Queue_Id' while defining column names (^ caret sign) in Set variable. But if we see this in Variable value after running this action, the column name values are updated without underscore. [Underscore is still available with the first column name : 'DTStatus_ToUpdte'.]

 

Please note that I made the correction (from without underscore to with underscore) in column names later for better readability. It looks like something memory issue. This happens even after rebooting machine as well.

 

Anyone have idea why the latest column names are not updating in Data table flow variable? This is failing at the further step where the column names are used with and without underscore.

 

 

 

Great, thx for the solution (at least for my question 😊 )

Helpful resources

Announcements

Power Platform Connections - Episode 7 | March 30, 2023

Episode Seven of Power Platform Connections sees David Warner and Hugo Bernier talk to Dian Taylor, alongside the latest news, product reviews, and community blogs.     Use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show.  

Announcing | Super Users - 2023 Season 1

Super Users – 2023 Season 1    We are excited to kick off the Power Users Super User Program for 2023 - Season 1.  The Power Platform Super Users have done an amazing job in keeping the Power Platform communities helpful, accurate and responsive. We would like to send these amazing folks a big THANK YOU for their efforts.      Super User Season 1 | Contributions July 1, 2022 – December 31, 2022  Super User Season 2 | Contributions January 1, 2023 – June 30, 2023    Curious what a Super User is? Super Users are especially active community members who are eager to help others with their community questions. There are 2 Super User seasons in a year, and we monitor the community for new potential Super Users at the end of each season. Super Users are recognized in the community with both a rank name and icon next to their username, and a seasonal badge on their profile.  Power Apps  Power Automate  Power Virtual Agents  Power Pages  Pstork1*  Pstork1*  Pstork1*  OliverRodrigues  BCBuizer  Expiscornovus*  Expiscornovus*  ragavanrajan  AhmedSalih  grantjenkins  renatoromao    Mira_Ghaly*  Mira_Ghaly*      Sundeep_Malik*  Sundeep_Malik*      SudeepGhatakNZ*  SudeepGhatakNZ*      StretchFredrik*  StretchFredrik*      365-Assist*  365-Assist*      cha_cha  ekarim2020      timl  Hardesh15      iAm_ManCat  annajhaveri      SebS  Rhiassuring      LaurensM  abm      TheRobRush  Ankesh_49      WiZey  lbendlin      Nogueira1306  Kaif_Siddique      victorcp  RobElliott      dpoggemann  srduval      SBax  CFernandes      Roverandom  schwibach      Akser  CraigStewart      PowerRanger  MichaelAnnis      subsguts  David_MA      EricRegnier  edgonzales      zmansuri  GeorgiosG      ChrisPiasecki  ryule      AmDev  fchopo      phipps0218  tom_riha      theapurva  takolota     Akash17  momlo     BCLS776  Shuvam-rpa     rampprakash  ScottShearer     Rusk  ChristianAbata     cchannon  Koen5     a33ik  Heartholme     AaronKnox  okeks      Matren   David_MA     Alex_10        Jeff_Thorpe        poweractivate        Ramole        DianaBirkelbach        DavidZoon        AJ_Z        PriyankaGeethik        BrianS        StalinPonnusamy        HamidBee        CNT        Anonymous_Hippo        Anchov        KeithAtherton        alaabitar        Tolu_Victor        KRider        sperry1625        IPC_ahaas      zuurg    rubin_boer   cwebb365   Dorrinda   G1124   Gabibalaban   Manan-Malhotra   jcfDaniel   WarrenBelz   Waegemma   drrickryp   GuidoPreite    If an * is at the end of a user's name this means they are a Multi Super User, in more than one community. Please note this is not the final list, as we are pending a few acceptances.  Once they are received the list will be updated. 

Register now for the Business Applications Launch Event | Tuesday, April 4, 2023

Join us for an in-depth look into the latest updates across Microsoft Dynamics 365 and Microsoft Power Platform that are helping businesses overcome their biggest challenges today.   Find out about new features, capabilities, and best practices for connecting data to deliver exceptional customer experiences, collaborating, and creating using AI-powered capabilities, driving productivity with automation—and building towards future growth with today’s leading technology.   Microsoft leaders and experts will guide you through the full 2023 release wave 1 and how these advancements will help you: Expand visibility, reduce time, and enhance creativity in your departments and teams with unified, AI-powered capabilities.Empower your employees to focus on revenue-generating tasks while automating repetitive tasks.Connect people, data, and processes across your organization with modern collaboration tools.Innovate without limits using the latest in low-code development, including new GPT-powered capabilities.    Click Here to Register Today!    

Check out the new Power Platform Communities Front Door Experience!

We are excited to share the ‘Power Platform Communities Front Door’ experience with you!   Front Door brings together content from all the Power Platform communities into a single place for our community members, customers and low-code, no-code enthusiasts to learn, share and engage with peers, advocates, community program managers and our product team members. There are a host of features and new capabilities now available on Power Platform Communities Front Door to make content more discoverable for all power product community users which includes ForumsUser GroupsEventsCommunity highlightsCommunity by numbersLinks to all communities Users can see top discussions from across all the Power Platform communities and easily navigate to the latest or trending posts for further interaction. Additionally, they can filter to individual products as well.   Users can filter and browse the user group events from all power platform products with feature parity to existing community user group experience and added filtering capabilities.     Users can now explore user groups on the Power Platform Front Door landing page with capability to view all products in Power Platform.      Explore Power Platform Communities Front Door today. Visit Power Platform Community Front door to easily navigate to the different product communities, view a roll up of user groups, events and forums.

Microsoft Power Platform Conference | Registration Open | Oct. 3-5 2023

We are so excited to see you for the Microsoft Power Platform Conference in Las Vegas October 3-5 2023! But first, let's take a look back at some fun moments and the best community in tech from MPPC 2022 in Orlando, Florida.   Featuring guest speakers such as Charles Lamanna, Heather Cook, Julie Strauss, Nirav Shah, Ryan Cunningham, Sangya Singh, Stephen Siciliano, Hugo Bernier and many more.   Register today: https://www.powerplatformconf.com/   

Users online (5,550)