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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (16,487)