cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Pass variable from flow to Power Apps application

Hello,

I'm working on a project where I want to make an HTTP request with Power Automate, and display the data that comes from the request, in my Power Apps application.

I currently have a text field in my application, where I want to display JSON from the request, and I also have the request ready in Power Automate, but I just can't figure out, how to use variables from Power Automate in my Power Apps application...


9 REPLIES 9
Nogueira1306
Super User
Super User

If the trigger is Power Apps you have this action:

Nogueira1306_0-1643283687763.png



And to use it in Power apps, do this:

If(

FlowName.Run( //INPUT APRAMETERS IF NEEDED // ).VarName = "ok",

Notify("OK"),

Notify ("ERROR")

)

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

Anonymous
Not applicable

Hi,
Thanks for responding @Nogueira1306 !

My Power Automate side looks like this -> 

AnttiKuisma_0-1643285096372.png
Now on my Application side "Get Folders" button is the one that triggers the automation, and the "label text" field is the place where I should display the JSON request ->

AnttiKuisma_1-1643285306428.png

Here is the "Get Folders" button properties -> 

AnttiKuisma_4-1643285904228.png

 

And the name of the text field where the data should be shown ->

AnttiKuisma_3-1643285491887.png

So how should I configure and which element?

I'm starting Power Platform a few hours ago, so basically, everything is pretty much new to me 🙂

On the button write this:

 

Set(JSONFromFlow , Getfolders.Run("Unattended").Body)



On the label, on Text property write this:

JSONFromFlow

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

Anonymous
Not applicable

@Nogueira1306 
I receive some error.

 

AnttiKuisma_0-1643286483599.png

It might have to do with you zone. Some countriesuse "," and others ";"

Try with ";"

 

 

Anonymous
Not applicable

@Nogueira1306 
"," is correct here

AnttiKuisma_0-1643287725536.png

Does that "JSONFromFlow" should be some sort of variable in PowerApps?

Yes...

Set function creates an variable

 

https://docs.microsoft.com/en-US/powerapps/maker/canvas-apps/functions/function-set

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

Anonymous
Not applicable

@Nogueira1306

When I manuyally run power automate that "jsonfromflow" receives the text properly:

AnttiKuisma_0-1643288324854.png

In variables :

AnttiKuisma_1-1643288585642.png

But I still have this issue

AnttiKuisma_2-1643288631850.png

With ; it says:

AnttiKuisma_3-1643288696687.png

 

You are giving only 1 parameter and you ask for 2

 

Set(JSONFromFlow , Getfolders.Run("Unattended"; PARAM2).Body)

 

Replace PARAM2 for your parameter

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,527)