cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Using JSON array/objects in control Items property

Hello

 

I am trying to use the following data structure in the Items property of a drop down control.  When i have a single object, it works, when i have multiple objects it does not.

 

This works fine. 

{
    Role: "Exchange Administrator",
    Id: "nnnnn",
    Description: "Users with this role have global permissions within Microsoft Exchange Online."
}

 

This does not.

{
   "Roles":[
      {
         "Role":"role 1",
         "Id":"nnn",
         "Description":"something."
      },
      {
         "Role":"role 2",
         "Id":"nnn",
         "Description":"something else."
      }
   ]
}

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @ajhstn ,

Do you want to connect the Dropdown control to a JSON String array?

 

Based on the data structure that you mentioned, it is a JSON String array rather than a Object Table supported in PowerApps. If you want to use JSON String value as data source within the Dropdown control directly, I afraid that there is no way to achieve your needs in PowerApps currently.

 

As an alternative solution, you could consider set the Items property of the Dropdown control to following formula:

Table(
      {
         Role:"role 1",
         Id:"nnn",
         Description:"something."
      },
      {
         Role:"role 2",
         Id:"nnn",
         Description:"something else."
      }
)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @ajhstn ,

Do you want to connect the Dropdown control to a JSON String array?

 

Based on the data structure that you mentioned, it is a JSON String array rather than a Object Table supported in PowerApps. If you want to use JSON String value as data source within the Dropdown control directly, I afraid that there is no way to achieve your needs in PowerApps currently.

 

As an alternative solution, you could consider set the Items property of the Dropdown control to following formula:

Table(
      {
         Role:"role 1",
         Id:"nnn",
         Description:"something."
      },
      {
         Role:"role 2",
         Id:"nnn",
         Description:"something else."
      }
)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Amazing, that works!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,785)