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

 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



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

 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,010)