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 / executing a stored pro...
Power Apps
Answered

executing a stored procedure not returning value from proc on screen

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a button and a label on my screen

Button code =  Set(varMaxId,getMaxRow.Run(lbl_Racfid.Text))  trying to assign my varMaxId the return value from my proc.

 

setting the label text to  :   varMaxId, but it just keeps returning true or false.

I'm getting the correct output  but cant dispplay correctly in my app?

 

 

 

flow1.pngflow2.png

Categories:
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Anonymous ,

     

    Use "Respond to PowerApps or flow" as last action in flow and define the variable you need from Flow to PowerApps.

    gabibalaban_0-1614149787672.png

    What you receive here as true value is the confirmation that the flow run successfully. Set(varMaxId,getMaxRow.Run(lbl_Racfid.Text))

    So use:

    Set(varMaxId,getMaxRow.Run(lbl_Racfid.Text).myResponseVariable)

    Please note that you might need to reconnect your flow to powerapps in order to update the modification.

     

    Hope it helps !

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    is this correct?

    i tried this but no success?

     

     

    flow3.png

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous ,

    No...The formula you need is: 

    body('Execute_stored_procedure_(V2)')['ResultSets']['Table1'][0]['Column1']

     

    Hope i didn't miss something in formula !😊

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Gab ,  Thank you !

    The formula worked fine...now i cant get the display to return my value on the screen.

    My button says : Set(varMaxId,getMaxRow.Run(lbl_Racfid.Text).varmaxid)

     

    also tried:  Set(varMaxId,getMaxRow.Run(lbl_Racfid.Text))

     

    my label to display the value is : "Text" =  varMaxId

  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous ,

    Try to use the return variable as string type, my formula returns a string not a number.

    And this is the right call:

     Set(varMaxId,getMaxRow.Run(lbl_Racfid.Text).varMaxid)

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard