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 / Using Flow inside powe...
Power Apps
Answered

Using Flow inside powerApps

(1) ShareShare
ReportReport
Posted on by 70

Hi PowerApps and Automate experts,

 

I hope someone can help, I have a flow that counts the ammount of items I have in a sharepoint list but I am really struggling to get it returned to my PowerApp, can someone explain how to achieve this please.

edymac2_0-1693275872011.png

I want to have a button on PowerApps that when pressed returns the output of the flow in a label.

 

Many Thanks

Ed

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @edymac2 

     

    Yes, use the following Action Block in your Flow:

    Respond to a PowerApp or flow

    poweractivate_0-1691285784511.png

     

    See if it helps @edymac2 

     

  • edymac2 Profile Picture
    70 on at

    Hi poweractivate,

     

    ive done this but to be more specific, its the formula or variable i need to use with onselect of the button and in the label that im struggling with.

    (i think this is right)

    edymac2_0-1693276459659.png

    Thanks in advance

    Ed

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @edymac2 
    To use the Flow from your Canvas App, you need to go to Power Automate --> Add Flow --> select your Flow from the List.

    poweractivate_0-1693276393691.png

     

    Then, while still in your Canvas App, type in the name of the Flow in the formula bar while in your button control's OnSelect property, select the name of the Flow that shows up, then press a dot, then type in Run, then an open parenthesis ( and then if you set up inputs in the Flow, pass them in, if not, pass in nothing ). 

    If you use the return value you may want to wrap it in Set function such as 

    Set(gloVariableName,YourFlowName.Run(...any inputs here...))

    otherwise if not using the return value at all, don't do this, and just use

     YourFlowName.Run(...any inputs here...)

    See if it helps @edymac2 

  • edymac2 Profile Picture
    70 on at

    Hi poweractivate,

     

    Thanks for your help, but im still not getting the desired result, the output of the flow is 34663 but my label says false,

     

    edymac2_0-1693278526111.png

    I've put the variable varCountAbloads in the text of the label, what am i missing ?.

     

    Ed

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @edymac2 

    Try this:

    1. Suppose this simple example below,

    a Respond to a PowerApp or flow block with the Output parameter named myNumber 

    which is defined as of the type Number in the block, and is defined as the static value 7:

    poweractivate_0-1693283564192.png

    In order to set varCountAbload to the return value (in this case 7) of the Flow, 

    from your Canvas App, try this formula below:

     

    Set(varCountAbloads,'PowerApp->SendanHTTPRequesttoSharePoint-2'.Run().myNumber)

     

    Replace myNumber above with the appropriate parameter in your case

     

    See if it helps @edymac2 

  • edymac2 Profile Picture
    70 on at

    Hi poweractivate,

     

    I tired this but still not working.

    edymac2_0-1693342375355.png

     

    edymac2_1-1693342416827.png

    i tried puting single and double quotes rount TotalCount, i triedall lower cas but nothings working.

     

    Ed

  • edymac2 Profile Picture
    70 on at

    Hi poweractivate,

     

    I re-created the flow from scratch, dont know why but the name of the flow changed and now the onselect formula doesnt have a red line under it, but when i run it i get the message below.

     

    edymac2_0-1693349617007.png

     

    edymac2_1-1693349716639.png

     

    Ed

     

     

  • edymac2 Profile Picture
    70 on at

    Hi PowerActivate,

    I changed the flow output to text and it get the below from the flow in the App, although i would prefer just the number, this gives me what i need, thank you for your help.

     

    edymac2_0-1693367160618.png

    Ed

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @edymac2 

    You can get just the number, here's an explanation for the issue you may be facing:

     

    Even if Power Automate output was set to Number, it's possible Power Automate may still return numbers as strings, which can lead to type mismatch issues in Power Apps. The error you got there says that the formula expects a number but receives a string instead.

     

    To work around this, you can try to wrap the right-hand side of the formula with the Value function to convert the string to a number. Here's how you can do it:

     

    Set(varCountAbloads, Value('PowerApp->SendanHTTPRequesttoSharePoint-2'.Run().myNumber))

     

    When using the Value function, the string returned from Power Automate should be converted to a number, allowing it to be stored in varCountAbloads without any issues.

    See if it helps @edymac2 

  • edymac2 Profile Picture
    70 on at

    Hi Poweractivate,

     

    Na that didnt work, still saying same error.

    edymac2_0-1693465333898.png

     

    Ed

     

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 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard