Hi!
So I have a button that will trigger a Flow (creates an excel file) then after the Flow is done I have a Download() function. Apparently that is not what's happening.
for better visual here the code on the OnSelect button.
CreateExcelFile.Run(mm.xlsx);
Download(excelLink);
The flow is not done yet and it will automatically go to Download(). Is there a way to delay the code while the flow is not done yet?
I think there is a way, but I did not try this with Download()
In the flow, there is an Action called Respond to a PowerApp or Flow Add this action at end of Your flow and add a variable and call it "Success", set it to true
just like on-screen below
Now back to Your button in Power App try this code :
If(CreateExcelFile.Run(mm.xlsx).Success = "true",
Download(excelLink))
Test it for both of us 🙂