I am creating a flow where I am getting the data from API in JSON format. I now want to display some of this data inside the canvas app. I am using response to send the data to canvas app. I am trying to populate the fields on button click but it is showing up blank
Hi, @Ameen1989
It depends on what data you want to get in the Power app, if you want all the data, you can pass your body('HTTP') to the Power app.
Similarly, you can use formulas to extract the text you want and pass it to PowerApp.
And you can also share your output of your http action and what the data you want to get in your Power App .
If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance!
Best Regards,
Yueyun Zhang
What did you write in the response to power app or flow function body?
Hi , @Ameen1989
Oh... This error code "JSON parsing error, expected object and got an error" seems to happen in your flow side . And you do not need to use the Parse Json action in flow. But you need to add the "Response to a Power App or flow" action in the last of your flow.
So that you can use this code in Power App.
Reponse is the parameter name you can see in my screenshot.
Set(MyAPIData, APIDATA.Run(cityName.Value).Reponse);
If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance!
Best Regards,
Yueyun Zhang
Yes I am calling the flow in power app. I am using the weather API to get the data. I am using the HTTP response Get method and passing the URI, after that I am using the Parse JSON and then the Response, to show only selected variables.
I am calling this flow in power apps. I am using a button and on click on I want to populate fields(lbl or input fields) with the data.
I am confused on what function I should write to get the data. For example, I am using this in the button OnSelect
Hi , @Ameen1989
Do you mean you call the flow in Power App and you want to get the response from the flow ?
If this , can you give me the response output in your side ? And also you can try to use the ParseJson() function.
ParseJSON function - Power Platform | Microsoft Learn
Best Regards,
Yueyun Zhang
MS.Ragavendar
10
LC-26081402-0
6
EE-04041031-0
4