cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,762)