cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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(...)

Anonymous
Not applicable

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,469)