Skip to main content

Notifications

Community site session details
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,070 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!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 48 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard
Loading started
Loading started