cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Richard2000
Level: Powered On

Handling JSON Array HTTP Respsonse in PowerApp

 Currently experiencing difficulty with utilizing custom connector to other APIs from PowerApps. In this scenario, I'm trying to connect to a 
REST API. The endpoint i'm accessing utilities a HTTP POST. I have been able to successfully set up the custom connector in PowerApps and can test it successfully there.

Here is the payload from HTTP response.
{
"Get__CompIntfc__ROY_LEAVE_BALANCESResponse": [
{
"leave_Description": "Vacation",
"amount": 216.25
},
{
"leave_Description": "MCP",
"amount": 0
},
{
"leave_Description": "Sick 70",
"amount": 350
},
{
"leave_Description": "Sick 100",
"amount": 560
},
{
"leave_Description": "Overtime Bank",
"amount": 0
},
{
"leave_Description": "CWW Banked",
"amount": 0
},
{
"leave_Description": "Your Monthly Vacation Accrual",
"amount": 14.58
}
]
}

I have tried to collect the results in powerapps with the following.

UpdateContext({Balance
:CI_ROY_LEAVE_BALANCES.CIROYLEAVEBALANCESG({'Ocp-Apim-Subscription-Key':"xxxxxxx",get__CompIntfc__ROY_LEAVE_BALANCES:{eMPLID:"04545"}})})

However, when I go to use this connector I don't seem to show the right response in PowerApp. The variable shows a table of Get__CompIntfc__ROY_LEAVE_BALANCESResponse with empty content. My question is how to parse the JSON array payload and display in PowerApp.

2 REPLIES 2
Dogbyte
Level: Powered On

Re: Handling JSON Array HTTP Respsonse in PowerApp

I am not totally in the "know" about your specific issue, but it jogged my memory about there being difficulty returning tabular data and having it display properly from custom api's... take a look at this explanation, it may be why you dont get the expected results. 

 

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Custom-API-with-tabular-capabilities/idc-p/22385

Highlighted
amandalee
Level: Powered On

Re: Handling JSON Array HTTP Respsonse in PowerApp

Hi there, did you get an answer on this? I have the same issue.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 351 members 4,560 guests
Please welcome our newest community members: