Forum Discussion
Tables Called in Flow Not Found
- Sep 07, 2023
The error you are encountering in Power Automate (formerly known as Microsoft Flow) indicating that the table is "not found" typically occurs when the table name referenced in the 'List rows present in table' action doesn't match the actual table name in the Excel workbook. To resolve this issue, follow these steps:
- Check Table Names in Excel:
- Open the Excel workbook that your script is modifying.
- Make sure that the tables created by your scripts indeed have the names you expect (e.g., "Table1," "Table2," etc.).
- Explicitly Specify Table Names:
- In your script, explicitly set the names of the tables you create using the addTable method. For example, you can modify your script like this:
let Continuous_Tbl = workbook.addTable(selectedSheet.getRange("A1:AP25"), true); Continuous_Tbl.setName("Table1"); // Specify the table name explicitly Continuous_Tbl.setPredefinedTableStyle("TableStyleLight8");
Make sure that the table names in your script match the actual table names in Excel.
- Use the Correct Table Names in Power Automate:
- In your Power Automate flow, when using the 'List rows present in table' action, make sure you are providing the correct table name that matches the one specified in your script. If you explicitly named the table in your script (as shown in the previous step), use that name. If you didn't specify a name, use the default "Table1," "Table2," etc.
- Check SharePoint List Connections:
- Ensure that your SharePoint list connections are correctly configured and that you are working with the right list.
- Test Incrementally:
- To identify the specific step where the issue is occurring, try running your flow incrementally. For example, start by running just one 'Run Script' action and see if the table is created and named correctly. Then, add the 'List rows present in table' action and test it separately.
- Flow Debugging:
- Use the built-in debugging capabilities of Power Automate to inspect variables and outputs at each step of your flow to identify where the issue is occurring.
- Flow Logging:
- Add logging actions (e.g., 'Compose' actions with informative messages) at key points in your flow to help diagnose issues. This can provide more visibility into the flow's behavior.
By carefully checking the table names in your Excel workbook and ensuring that they match the names referenced in your script and Power Automate, you should be able to resolve the "not found" error and successfully list rows present in the tables in your flow.
My knowledge of this topic is limited, but I entered your question in various AI. The text and the steps are the result of various AI's put together.
My answers are voluntary and without guarantee!
Hope this will help you.
The error you are encountering in Power Automate (formerly known as Microsoft Flow) indicating that the table is "not found" typically occurs when the table name referenced in the 'List rows present in table' action doesn't match the actual table name in the Excel workbook. To resolve this issue, follow these steps:
- Check Table Names in Excel:
- Open the Excel workbook that your script is modifying.
- Make sure that the tables created by your scripts indeed have the names you expect (e.g., "Table1," "Table2," etc.).
- Explicitly Specify Table Names:
- In your script, explicitly set the names of the tables you create using the addTable method. For example, you can modify your script like this:
let Continuous_Tbl = workbook.addTable(selectedSheet.getRange("A1:AP25"), true);
Continuous_Tbl.setName("Table1"); // Specify the table name explicitly
Continuous_Tbl.setPredefinedTableStyle("TableStyleLight8");
Make sure that the table names in your script match the actual table names in Excel.
- Use the Correct Table Names in Power Automate:
- In your Power Automate flow, when using the 'List rows present in table' action, make sure you are providing the correct table name that matches the one specified in your script. If you explicitly named the table in your script (as shown in the previous step), use that name. If you didn't specify a name, use the default "Table1," "Table2," etc.
- Check SharePoint List Connections:
- Ensure that your SharePoint list connections are correctly configured and that you are working with the right list.
- Test Incrementally:
- To identify the specific step where the issue is occurring, try running your flow incrementally. For example, start by running just one 'Run Script' action and see if the table is created and named correctly. Then, add the 'List rows present in table' action and test it separately.
- Flow Debugging:
- Use the built-in debugging capabilities of Power Automate to inspect variables and outputs at each step of your flow to identify where the issue is occurring.
- Flow Logging:
- Add logging actions (e.g., 'Compose' actions with informative messages) at key points in your flow to help diagnose issues. This can provide more visibility into the flow's behavior.
By carefully checking the table names in your Excel workbook and ensuring that they match the names referenced in your script and Power Automate, you should be able to resolve the "not found" error and successfully list rows present in the tables in your flow.
My knowledge of this topic is limited, but I entered your question in various AI. The text and the steps are the result of various AI's put together.
My answers are voluntary and without guarantee!
Hope this will help you.
NikolinoDE
Here is an example. The flow errors out on the first 'List rows present in a table', saying there is no 'Table1'.
Yet, you can clearly see in the Excel workbook the script created a 'Table1'.
- SergeiBaklanSep 08, 2023Diamond Contributor
As for the Power Automate. Flow actually gets table not by name, but it's internal ID. If you create flow with existing table, you simply add its name, flow converts internally to ID and work with it. Next time you run query, you create the table with the same name, but each new table have new ID independently of name. Flow tries to find that ID and files - you re-created the table and old ID doesn't exists.
The workaround could be as following.
After running the script we initialize string variable and Get Tables on the file
Get Tables returns collection (array) with each table data. We are interesting in ID and Name.
In Apply To Each we set ID on above variable for the table with given name
On the next step wit add this variable from dynamic content as table name
With that all works