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

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 88 members 4,754 guests
Please welcome our newest community members: