web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating a dropdown fr...
Power Apps
Answered

Creating a dropdown from a complex object returned from API / JSON [object Object]

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm building a basic app using an API backend (asp.net). The powerapp should make api calls for each action that takes place. 

 

I am having trouble accessing the values within my JSON response which I have currently set up with an on-premise gateway.

 

I have tested the API call on swagger and on the test page of 'Custom Connectors'. The data is being returned, I just don't know how to display it. I've posted some images of the problem, the returned JSON and the associated error, which reads:

 

"Warning: The column produced by this rule are all nested tables and/or records, however the property expects at least some columns of simple values (such as text, or numbers)"

 

image1.png

See the JSON response below. I would like to just display the 'text' value for each risk, and ideally store the 'id' within the collection for submission.

image2.png

 

Any help would be greatly appreciated, thanks.

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about your scenario?

    Do you want to display the 'text' value for each risk within the Dropdown box, but store the 'id' value back to your data source?

     

    Based on the formula that you mentioned, I think there is something wrong with it. The IncidentReportAPI.GetAllRisks().result.items formula would return a Object Array, within each object, it also includes a nested object.

    Currently, within PowerApps app, we could not display a Object Array with nested object directly within a Dropdown box.

     

    As an alternative solution, I think the ForAll function could achieve your needs, please consider take a try with the following workaround:

    Set the Items property of the Dropdown box to following:

    ForAll(
     IncidentReportAPI.GetAllRisks().result.items,
     {
     Text: risk.text,
     Id: risk.id
     }
    )

    use the Text attribute as DisplayColumn value within the Dropdown box, then text value for each risk could be displayed in your Dropdown box.

     

    When you want to reference the selected text value or id value from above Dropdown box, please use the following formula:

    Dropdown1.Selected.Text
    Dropdown1.Selected.Id

     

    If you want to bind the above Dropdown box to a field in your Edit form, please set the Update property of the field in your Edit form to following:

    Dropdown1.Selected.Id

    then when you save your form data, the Id value of the selected text within the Dropdown box would be saved back to your data source.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Kris,

     

    Yes, this is exactly what I needed, thank you.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard