cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
roybridge
New Member

Add a row into a Table - Excel Online (Business) - is it possible to force file and table names rather than use the underlying File ID and table GUID?

As the title asks. 

 

When I receive an email with an Excel attachment, that attachment gets saved to OneDrive and renamed to temp.xlsx for some processing, then gets renamed back to it's original name when done.

 

I want the flow to have an action of "Add a row into a Table", but when I peek at the code, it is referring to a File ID and the GUID of the table within that File ID. The problem is that the temp.xlsx that gets created each time will have a different File ID and a different table GUID. Is there a way for force / trick "Add a row into a Table" to work purely on the File Name and Table Name?

1 ACCEPTED SOLUTION

Accepted Solutions
Rhiassuring
Super User
Super User

Hi there, 

Yep! We can trick it.

 

Rhiassuring_0-1649397069909.png

 

Step 1 - Set a variable with the filename.
Step 2 - "Get Tables" using that filename.

Step 3 - Add a row into a table: Filename is that beautiful variable again, Table is a custom value set to: outputs('Get_tables')?['body/value'][0]?['name'], and Row is set to JSON to populate the row with { "ColumnName": "Value" }

Let me know how you go!

 

Cheers,

 

Rhia

 

View solution in original post

3 REPLIES 3
Rhiassuring
Super User
Super User

Hi there, 

Yep! We can trick it.

 

Rhiassuring_0-1649397069909.png

 

Step 1 - Set a variable with the filename.
Step 2 - "Get Tables" using that filename.

Step 3 - Add a row into a table: Filename is that beautiful variable again, Table is a custom value set to: outputs('Get_tables')?['body/value'][0]?['name'], and Row is set to JSON to populate the row with { "ColumnName": "Value" }

Let me know how you go!

 

Cheers,

 

Rhia

 

Hi Rhia,

 

Thanks for the suggestions. I have created a variable for the filename, but because the filename is different every time, I have set it like this:-

 

PowerAutomate11.PNG

 

However, if I try to use "originalFileName" in the File field of the Add row a row into a Table action, then the Row field didn;t show for me.

 

Instead, I tried to set the File field to "File Identifier", and that DID give me the Row field as below:-

 

PowerAutomate12.PNG

 

However, the flow fails when attempting to insert the rows into the table:-

 

PowerAutomate9.PNGPowerAutomate10.PNG

Ah-ha! It's now working. I have to remove the quotataion marks from around the dynamic Field names.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,843)