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
Frequent 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

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!    

Welcome to the Power Automate Community

You are now a part of a fast-growing vibrant group of peers and industry experts who are here to network, share knowledge, and even have a little fun.   Now that you are a member, you can enjoy the following resources:   Welcome to the Community   News & Announcements: The is your place to get all the latest news around community events and announcements. This is where we share with the community what is going on and how to participate.  Be sure to subscribe to this board and not miss an announcement.   Get Help with Power Automate Forums: If you're looking for support with any part of Power Automate, our forums are the place to go. From General Power Automate forums to Using Connectors, Building Flows and Using Flows.  You will find thousands of technical professionals, and Super Users with years of experience who are ready and eager to answer your questions. You now have the ability to post, reply and give "kudos" on the Power Automate community forums. Make sure you conduct a quick search before creating a new post because your question may have already been asked and answered. Galleries: The galleries are full of content and can assist you with information on creating a flow in our Webinars and Video Gallery, and the ability to share the flows you have created in the Power Automate Cookbook.  Stay connected with the Community Connections & How-To Videos from the Microsoft Community Team. Check out the awesome content being shared there today.   Power Automate Community Blog: Over the years, more than 700 Power Automate Community Blog articles have been written and published by our thriving community. Our community members have learned some excellent tips and have keen insights on the future of process automation. In the Power Automate Community Blog, you can read the latest Power Automate-related posts from our community blog authors around the world. Let us know if you'd like to become an author and contribute your own writing — everything Power Automate-related is welcome.   Community Support: Check out and learn more about Using the Community for tips & tricks. Let us know in the Community Feedback  board if you have any questions or comments about your community experience. Again, we are so excited to welcome you to the Microsoft Power Automate community family. Whether you are brand new to the world of process automation or you are a seasoned Power Automate veteran - our goal is to shape the community to be your 'go to' for support, networking, education, inspiration and encouragement as we enjoy this adventure together.     Power Automate Community Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Users online (3,499)