cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
illmatic
Helper IV
Helper IV

Get multiple Power Automate outputs into PowerApps

I have canvas app that submits a form to SP.  I would like to display an outcome screen that shows a success message which contains OutputA from a flow, and a failure message that displays only if OutputB equals 200.  

 

Right now, the OnSuccess property of my form in the PowerApp is set to create two variables which will hold OutputA and OutputB in Labels.   Set(FinalMsg, nameofFlow.Run(Form1.LastSubmit.ID).finalmsg);  Set(FailureMsg, nameofFlow.Run(Form1.LastSubmit.ID).failureMsg); Navigate(outcome);

 

This means the flow runs twice to set each of the variables.  Is there any way that I can set both variables within one call?    Here is the output for the action 'Responds to PowerApps' in the flow.

flow_respondToPA.png

 

 

 

Finally, on the Outcome screen I have set the OnVisible property of the screen to the following:  UpdateContext({results:If(failureMsg=200, false});     The error I get is that failureMsg cannot be evaluated because it is saved as a string and 200 is an integer.  Is it possible to format 200 as a string in PowerApps?  Or, should I convert failureMsg to an integer in the Flow?

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

You can change the formula to run the flow once and put both values in a variable and then use that one variable with a dot notation. For the If() in the UpdateContext() you can convert the 200 to text or convert the failureMsg to a number.

 

Example of flow call:

Set(varFlowreResponse, nameofFlow.Run(Form1.LastSubmit.ID));

 

Example of using the variable:
varFlowreResponse.finalmsg

varFlowreResponse.failuremsg

 

Output workarounds:

Convert 200 to text

UpdateContext({results:If(failureMsg="200", false});

or convert failureMsg to a number
UpdateContext({results:If(Value(failureMsg)=200, false});

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Jeff_Thorpe
Super User
Super User

You can change the formula to run the flow once and put both values in a variable and then use that one variable with a dot notation. For the If() in the UpdateContext() you can convert the 200 to text or convert the failureMsg to a number.

 

Example of flow call:

Set(varFlowreResponse, nameofFlow.Run(Form1.LastSubmit.ID));

 

Example of using the variable:
varFlowreResponse.finalmsg

varFlowreResponse.failuremsg

 

Output workarounds:

Convert 200 to text

UpdateContext({results:If(failureMsg="200", false});

or convert failureMsg to a number
UpdateContext({results:If(Value(failureMsg)=200, false});

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

illmatic
Helper IV
Helper IV

Thank you, this worked like a charm :).  I don't know why I was thinking I needed to create an array of the flow responses!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,401)