cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnOReilly34
Level: Powered On

Flow validation in PowerApps

Hi, 

 

I would like to move to a suceess screen when I run a flow and when the flow doesn't run, I'd like to go to another screen (unsuccessful). 

I think I've done the success part correctly but I'm not sure how I do the unsuccessful screen part. 

 

On select I've the following: 

If(PApps_BCard_Create_Contact.Run(paramFirstName,paramLastName,paramCompany,paramMobile,paramJobTitle,paramEmail,paramAddress,paramAkadTitel,TakenPhoto,Dropdown.Selected.Value);Navigate('Success Screen',ScreenTransition.Fade),true)

 

I changed it to this but it always jumps to the unsuccessful screen. 

If(PApps_BCard_Create_Contact.Run(paramFirstName,paramLastName,paramCompany,paramMobile,paramJobTitle,paramEmail,paramAddress,paramAkadTitel,TakenPhoto,Dropdown.Selected.Value);Navigate('Success Screen',ScreenTransition.Fade),true); If(PApps_BCard_Create_Contact.Run(paramFirstName,paramLastName,paramCompany,paramMobile,paramJobTitle,paramEmail,paramAddress,paramAkadTitel,TakenPhoto,Dropdown.Selected.Value);Navigate('Success Screen_1',ScreenTransition.Fade),false)

 

Any ideas please? Thanks for any help.

 

11 REPLIES 11
Dual Super User
Dual Super User

Re: Flow validation in PowerApps

First, you need to setup a Respond to PowerApps action in the Flow that returns a True or False depending on whether the flow worked or not. That result will have a name, I called mine Result. So this is the formula that worked for me.

If(FlowReturnValue.Run(your parameters here).result = "True",Navigate(SuccessScreen,ScreenTransition.Fade),Navigate(FailureScreen,ScreenTransition.Fade))

The IF statement will call the Flow and evaluate the returned result value as either True or False.  If True it will navigate to success, if False it will navigate to failure.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
JohnOReilly34
Level: Powered On

Re: Flow validation in PowerApps

Hi, 

 

Thanks. Would you be able to share a screenshot of your flow please?

 

Thank you

Dual Super User
Dual Super User

Re: Flow validation in PowerApps

My Flow was very short.  Just the essentials to call the Flow and then return the value.

screenshot.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
caseyroot
Level: Powered On

Re: Flow validation in PowerApps

This is very helpful and logical, except I cannot get the syntax right... 

It's not liking the ".return="true", portion of the formula.  

Dual Super User
Dual Super User

Re: Flow validation in PowerApps

In PowerApps you need to save the response in a variable or collection and then access it via the variablename.return



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
caseyroot
Level: Powered On

Re: Flow validation in PowerApps

Can you provide screen shots or walk me through this?  Not having much luck on my own.

Dual Super User
Dual Super User

Re: Flow validation in PowerApps

Can you show me the REspond to Power Apps action at the end of your Flow?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
caseyroot
Level: Powered On

Re: Flow validation in PowerApps

Absolutely, it's the same as your screen shot in your setup instructions.

Dual Super User
Dual Super User

Re: Flow validation in PowerApps

Not sure what to tell you then.  If you look at my first post you can see what I put in my powerApp to have it respond to the Flow return value.  Not sure why it isn't doing that in yours.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,441)