cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
acummings
Frequent Visitor

Unable to populate dropdown with API JSON response via custom connector

Hi, 

 

I'm attempting to write this post for a second time as the first seems to have disappeared without a trace.

 

I have been attempting to populate a drop-down within my app using a custom connector (an on-premise gateway). However, I cannot figure out how to access/display the information within the JSON result that is returned.

 

I want to display the 'text' value of each 'risk' inside the dropdown. The API is successful and the correct data is returned (see images), but I can't figure out how to actually access this value. The error I receive when I try to access each 'risk' is:

 

"Name isn't valid. The identifier isn't recognized."

 

I believe it's not being recognised because it is unable to access the object returned.

 

Any help would be greatly appreciated. Thanks.

 

image1.png

 

 

image2.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Carsten_Growth
Power Apps
Power Apps

If you take a look at your JSON the items returned is an object. Which means it becomes records inside Power Apps. You would first need to either Ungroup that object to become a table you can work with or drill-in with FirstN(...)

View solution in original post

2 REPLIES 2
Carsten_Growth
Power Apps
Power Apps

If you take a look at your JSON the items returned is an object. Which means it becomes records inside Power Apps. You would first need to either Ungroup that object to become a table you can work with or drill-in with FirstN(...)

View solution in original post

Hi Carsten_Growth,

 

Yes you are correct - in order to display the correct values I had to drill into the items object. The formula I used was:

 

ForAll(IncidentReportAPI.GetAllRisks().result.items, risk.text)

 

Thanks!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (42,236)