Additional file-related features and issues within Microsoft Teams for business
Hello Christopher,
I'm Ibhadighi and I'd happily help you with your question. In this forum, we are Microsoft consumers just like yourself.
To automate the copying of new entries from one Excel file to another in Office 365 hosted on Teams sites, you can use Microsoft Power Automate (formerly known as Microsoft Flow) for this process. Here’s a simplified approach:
- Trigger: Use the **Recurrence** trigger to run your flow daily.
- Get Data from Complaint Analysis:
- Use the **List rows present in a table** action to get data from the Complaint Analysis file. Specify the table.
- Use an expression to find the maximum "Ref" value. You might need a loop to iterate through the rows to find this or use an aggregation function if available.
- Get Data from Complaint Submissions:
- Use another **List rows present in a table** action for the Complaint Submissions file.
- Filter New Entries:
- Instead of using Compose actions for conversion, directly use the expression in the **Condition** to compare ID and Ref. For converting string to integer, you can use the
int()function within the Condition itself if necessary. - The condition should check if the "ID" from Complaint Submissions is greater than the maximum "Ref" found in step 2.
- Instead of using Compose actions for conversion, directly use the expression in the **Condition** to compare ID and Ref. For converting string to integer, you can use the
- Add New Entries:
- For rows that meet the condition (True branch), use the **Add a row into a table** action to insert the row into the Complaint Analysis file.
Your flow structure would look something like this:
- Recurrence
- List rows present in a table (Complaint Analysis) -> Find max Ref
- List rows present in a table (Complaint Submissions)
- **For each row in Complaint Submissions**:
- **Condition**: Check if "ID" > max "Ref" (you might need to handle data conversion here directly in the condition)
- **True**: Add a row into Complaint Analysis Table
- **Condition**: Check if "ID" > max "Ref" (you might need to handle data conversion here directly in the condition)
Make sure to adjust expressions for data conversion directly in the Condition or Filter array step if Power Automate supports this operation for your data types. This avoids the complexity of multiple compose actions for conversion. If you face limitations with direct conversions or comparisons in Power Automate, consider preprocessing steps in your Excel files or using auxiliary columns in your Excel sheets to ensure data is in the correct format for comparison.
I hope this helps.
Best Regards, Ibhadighi