Hi,
We have a form where the User fills the data and click the Submit button. Then the data will be saved to the SQL table and email notifications are sent using Flows and the User will be navigated to the confirmation screen.
Button.Onselect: MyFlow.Run();Navigate(ConfirmationScreen,ScreenTransition.None)
Is there a way where we can check if the Flow has been actually executed before the user is navigated to the confirmation screen? I have checked the OnSuccess property of the Form, it works if we are using SubmitForm() and I am not sure how to validate the Flow instance.
Any help on this would be greatly appreciated.
Regards,
Dileep
Solved! Go to Solution.
Hi @DileepGolla,
The Flow.Run() would generate a result within PowerApps to indicate whether it has been executed successfully.
If it succeed, the result would be true, otherwise, it will run in false.
You may take a try to add a button and implement the following code to check:
ClearCollect(FlowResult, MyFlow.Run() )
The FlowResult collection would just show a Value column with the result to 'true' or 'false'.
So if here you would like to navigate to another screen based on the success result of the flow running, the formula should be written as :
If( MyFlow.Run(), Navigate(ConfirmationScreen,ScreenTransition.None), true)
The logic here is when the Flow Runs, it will check the running result, if succeed, navigate to another screen, otherwise returns true to stay with current screen, you may also define other actions if flow fails.
Regards,
Michael
Hi @DileepGolla,
The Flow.Run() would generate a result within PowerApps to indicate whether it has been executed successfully.
If it succeed, the result would be true, otherwise, it will run in false.
You may take a try to add a button and implement the following code to check:
ClearCollect(FlowResult, MyFlow.Run() )
The FlowResult collection would just show a Value column with the result to 'true' or 'false'.
So if here you would like to navigate to another screen based on the success result of the flow running, the formula should be written as :
If( MyFlow.Run(), Navigate(ConfirmationScreen,ScreenTransition.None), true)
The logic here is when the Flow Runs, it will check the running result, if succeed, navigate to another screen, otherwise returns true to stay with current screen, you may also define other actions if flow fails.
Regards,
Michael
Hello,
I have a MyFlow.Run() method that is returning true when a flow fails.
Are there any other ways to check the results of a Flow in PowerApps?
Yes, my Flow also fails and returns true
My problem is that some flows aren't even starting so this method would still be useful for me.
@SChorkawy wrote:Hello,
I have a MyFlow.Run() method that is returning true when a flow fails.
Are there any other ways to check the results of a Flow in PowerApps?
That's because it started (yay!), it just didn't finish successfully (boo). I don't know of any way of reading back the progress of a flow, besides adding steps in the flow which update some table of field. Your PowerApp can then read that field.
Has anyone figured out how to return that even though the flow ran, the process it ran did not run successfully? I have a process that creates a PDF file, if the file is already there, the creation fails but since the flow ran, it returns success. I would like it to return a failure code so that I can report that back to the power app.
Assuming your files are stored on SharePoint, you could use a "Get files (properties only)" step, loop through the output of this step, and set a variable to say the file was found.
HD.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
201 | |
69 | |
51 | |
49 | |
20 |
User | Count |
---|---|
261 | |
122 | |
85 | |
79 | |
72 |