Mar 04 2021 10:05 PM
Mar 04 2021 10:05 PM
I have a Form for employees. One text field is department name.
I add the survey row into a particular department excel workbooks on sharepoint, i.e.
Now I use switch to select the way with particular excel workbook and I select the workbook manually in the folder icon of the action field in every case.
But there are many departments, is it possible to set the excel file by variable in the "add row to excel" action?
Mar 05 2021 03:01 AM
@Zdenek_Moravec no it's not possible because the Add a row into a table action won't know which table columns to add to the action when you are building the flow so you will always get an error when you try to save it. You can copy the action to your clipboard and then add it to each switch case, but you will need to change the file in each case.
Microsoft Power Automate Community Super User
Mar 05 2021 11:19 AM - edited Mar 05 2021 02:13 PM
OK, I see now, the manually selected file in the field "File" triggers the list of tables in the next field "Table". BTW, the option Add dynamic content in the field "File" is then useless, isn't it?
Anyway, I have created 16 more cases.
Copy the action is a good idea, but it does not work in my case - "Failed to find xxx in definition" (I have copied the Excel action in Case 2, created next case, clicked new action and selected My Clipboard)
Mar 05 2021 06:00 PM
I might be too late if you've already gone another route, but this post and video by John Liu might help you use dynamic Excel file names... I've used these methods to add rows to Excel files which have a different name on each flow run. It's a little advanced, using SharePoint http requests, but it's quite cool once it's working!
Please see https://johnliu.net/blog/2019/5/workarounds-needed-to-use-the-excel-connector-in-microsoft-flow and https://www.youtube.com/watch?v=64lSykOYmzI
Hope this helps!
Mar 06 2021 01:22 PM
Hello @Sandy Ussia
Thank You for the link. The guide is really very advanced to me. I will stay by the basic level and I will study this guide once I get more advanced skills in power automate ;)