Same as this question but the solution there isn't helping.
My flow is as follows:
My CDS entity always has more than 1 record so this is definitely an issue. Right now it has 5 records.
When I check my run history both Compose #8 and Compose #9 always matches, so Condition #12 always goes to Yes. Compose #9 is always the correct number I want and it's never 1, which should mean my Excel file is fully populated and ready. I've even added a wait timer at #10 to give OneDrive a bit more time AFTER it's already reported having the correct number of rows.
But when I get the file content, the email attachment always just has 1 row in it.
WHY? I don't get it. There are no further changes to the Excel file after adding rows at #6.2.2. Flow is telling me it has 5 rows. If it has 5 rows at #7 List rows, it should still have 5 rows at #11 Delay until, and it should still have 5 rows at #12.2.1 Get file content. I've bloodied CHECKED and CONFIRMED that it has 5 rows AND I've given it extra time BEFORE doing get file content/send mail, and yet somehow when it's getting file content, waaaaay at the end after alllll the checks and balances, it goes down to 1 row only.
The solution given in the linked post at the top said to add a minute delay. If it comes to that sure I'll do it but I'm not happy about it. My flow without the 20s wait timer takes a mere 10s! Adding 20s is already a 200% loss in efficiency.
Alternatively, is there a way to force the Excel file to save or refresh or recache or whatever, so that any delay I need to add just needs to be what it takes to save a file, and not an arbitrary number of seconds that we think should be enough for Get file content to grab the right contents?
Did you find a solution to your issue or is it still relevant?
Please note that there are several limitations to using Excel Online (OneDrive) that you should be aware of.
Let us know how it went.
Kind regards, John
Yes the issue is still present, I'm using delays as a workaround to avoid it. I believe it is due to the known issue:
When I monitor the file in OneDrive directly it is populated as required in real time, but when Flow picks the file up using the OneDrive connector it picks up some twillight zone file in a limbo state that doesn't reflect what I'm seeing directly in OneDrive.
I am disappointed at finding out that the potential delay is up to 12 minutes (in that 12 minutes is a very long time). My workaround delays currently only sum up to 2 minutes. If I get feedback from my users that 2 minutes is no longer sufficient then I will change the email to simply sending a download link to the file instead of trying to attach it using a connector.
Have you tried to replace step 2 and 3 (list rows and delete them) by using one Excel file as the template, copy it, and then use the new Excel file to just add your data? No need then to first delete existing rows, as there are none.
Could you explain why an Excel file is needed? Like is it a requirement from the recipient. Could maybe a CSV file be used instead?
Just some ideas, hope it could help finding a solution
Kind regards, John
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.