web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Flow response not show...
Power Apps
Answered

Flow response not showing correctly in PowerApps

(0) ShareShare
ReportReport
Posted on by 524

Hi all, 

 

I have a Flow that returns an error code and message to PowerApps using a SQL stored procedure. The Flow is running correctly and returning the correct error message and code, however, in Powerapps the code coming through is not correct. Please see attached screen shots. In the example the correct code 2 is showing in Flow, but 0 is coming through in PowerApps. 

 

Any ideas why? 

 

Thanks

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,651 Most Valuable Professional on at

    Try using Text() instead of Value() for your printout.  Value() converts text to a number and Text() converts a number to Text.  Since you are concatenating you want to convert the errorcode to a string, not a number.

  • HFG Profile Picture
    524 on at

    Hi @Pstork1 , 

     

    Thanks for your reply. 

     

    When I try Text() the number disappears completely, the same if I simply put varUpdateResponse.number.

     

    This label was actually just a test to see what was being returned. I am using the value to show an error message (see below). Currently I am having to use <>0 as it does not work if I do >0.  This is working which is also strange as from the label it suggests that PowerApps is getting 0 back from Flow. 

     

    If(
    varUpdateResponse.number<>0
    ,Notify(varUpdateResponse.error_message,NotificationType.Error);

  • Pstork1 Profile Picture
    69,651 Most Valuable Professional on at

    I think the key here is to take a look at the Schema in the input section of your respond to Powerapps.  You can see in my test the error number is coming back as text.

    Screenshot2.png

    So I store that return value as a table in a variable and then just concatenate the results in Powerapps and it works.

    screenshot.jpg

    The other potential problem might be your use of Terminate - Fail.  That may interfere with the Respond to PowerApps.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @HFG ,

    Could you please share a screenshot about your whole flow's configuration?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

     

    5.JPG

    Flow's configuration as below:6.JPG

     

    7.JPG

    Please check if the varUpdateResponse variable within your app contains a proper number value.

     

    I have reproduced your issue on my side, if you defined a Number output within your "Respond to PowerApps" action, but you provide a String value for it, when the flow return data back to your app, the Number output property would be Blank, then the Value(NumberOutput) would be 0.8.JPG

    Please make sure the Output variable you defined in your "Respond to PowerApps" action and the corresponding value you provided for it have same data type.

     

    Best regards,

  • HFG Profile Picture
    524 on at

    Hi @v-xida-msft

     

    Thanks for looking into this. 

     

    Here is my full Flow. I have also checked the variable in PowerApps and the data type is showing as Number. 

     

    Cheers

     

     

     

     

  • HFG Profile Picture
    524 on at

    Hi @Pstork1 , 

     

    Thanks again for looking into it. In the Schema of my Flow the number is correctly coming back as number...strange

     

     

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @HFG ,

    Do you add a Condition action after the "Respond to PowerApps" action in your flow?

     

    Based on the flow's configuration that you provided, I think there is something wrong with it. If you want to pass data from a flow back to an app using the "Respond to PowerApps" action, you should define the "Respond to PowerApps" action as last action in your app.

     

    Please consider remove the actions (condition action) under the "Respond to PowerApps" action within your flow, then re-save your flow, try the formula again, check if the issue is solved.

     

    In addition, please make sure the ReturnCode dynamic content from the "Execute SQL procedure (V2)" action is also a Number value. You could also consider use int() function to convert the ReturnCode dynamic content value into a number value as below:4.JPG

    set the value box for the number output to following formula:

    int(body('Execute_stored_procedure_(V2)')?['returncode'])

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • HFG Profile Picture
    524 on at

    Hi @

     

     

  • HFG Profile Picture
    524 on at

    Hi again, 

     

    In case it is useful to anyone, a colleague pointed out that if the int() expression works, it's because Flow was expecting a text for the error code. I guess that is what you were all trying to tell me! We tested choosing text for the error code output and that also works (even if it seems a little strange when the error code is a number!). 

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard