cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Power Apps
Power Apps

Re: Unable to populate dropdown with API JSON response via custom connector

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
Highlighted
Power Apps
Power Apps

Re: Unable to populate dropdown with API JSON response via custom connector

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

Highlighted
Frequent Visitor

Re: Unable to populate dropdown with API JSON response via custom connector

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
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,421)