Search code examples
powerapps

How to pass variable from PowerApp to HTTP step of the PowerApp flow?


I'm trying to set a global variable inside the PowerApp application by using:

Set(barcodeStr,BarcodeScanner.Value)

After that, I want to pass a value of that variable to Power App Flow to use that string to construct a URL for sending a GET request to some server.

Am I on the right way to do that with the following steps:

enter image description here

When I try to manually insert a hardcoded string I get a response from the server that is correct, but I want to do that dynamically passing the variable from Power App.


Solution

  • In the 'initialize variable' step, if you click on the value text input, you should see an option for the dynamic content to get the value from Power Apps:

    enter image description here

    Once that is done, you save the flow, and add it in Power Apps, you will have the ability to pass that value to the flow, something like

    YourFlowName.Run(barcodeStr)