Skip to main content

Notifications

Community site session details

Community site session details

Session Id : v3fJsW4IP2BrDFMbDzXjYB
Power Apps - Building Power Apps
Answered

Bind complex json to label and dropdown of gallery in canvas app.

Like (0) ShareShare
ReportReport
Posted on 26 Jan 2024 08:39:48 by 15

I have below json output 
[
{
"moduelName": "test module",
"instructorinfo": [
{
"instructorName": "test test",
"instructorId": "1931dec0-c1ba-ee11-9078-6045bdd0ed08"
}
]
},
{
"moduelName": "test module1",
"instructorinfo": [
{
"instructorName": "test test",
"instructorId": "1931dec0-c1ba-ee11-9078-6045bdd0ed08"
},
{
"instructorName": "test test",
"instructorId": "1931dec0-c1ba-ee11-9078-6045bdd0ed08"
}
]
}
]
My requirement is On the gallery two control are there label and dropdown. On label I want to show each module name and on the dropdown I want to show the  associate instructor name . for example for first module it will  show the "test module" and only 1 instructor in dropdown and for other module it will show the "test module1" and 2 instructor in dropdown.

  • Shubham_Koolwal Profile Picture
    15 on 27 Jan 2024 at 04:19:11
    Re: Bind complex json to label and dropdown of gallery in canvas app.

    Yeah super, working as expected. Thank you so much.

  • Verified answer
    BCBuizer Profile Picture
    22,034 Super User 2025 Season 1 on 26 Jan 2024 at 12:13:53
    Re: Bind complex json to label and dropdown of gallery in canvas app.

    Hi @Shubham_Koolwal ,

     

    In a test I set your JSON string as the text in a Text Input control (TextInput1) so I could reference it.

     

    Then I added a gallery and set its' Items property to:

    Table(ParseJSON(TextInput1.Text))

    Inside the gallery, I used the below for the Text property of a label to display the module:

    Text(ThisItem.Value.moduelName)

    And finally for the dropdown I set its' Items property to:

    ForAll(ThisItem.Value.instructorinfo,{instructorName: Text(ThisRecord.instructorName), instructorId: Text(ThisRecord.instructorId)})

     

    This gave me the below result:

    BCBuizer_0-1706271190675.png

     

    For reference and credits: I used this article to get to this solution: https://devoworx.net/powerapps-parse-json-examples/

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started