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 / Create Nested Collections
Power Apps
Answered

Create Nested Collections

(0) ShareShare
ReportReport
Posted on by 36

Hello everyone,

I am trying to build some nested collections:
=============================
ClearCollect(
colEintritt,
{
colCheckliste: {
colStandardsoftware: {
Standardsoftware: galStandardSoftware.Selected.lbl_Office365_2.Text,
angefordert: galStandardSoftware.Selected.Checkbox1.Value,
installiert: galStandardSoftware.Selected.Checkbox1_1.Value
},
colOptionaleSoftware: {
optSoftware: galOptionaleSoftware.Selected.lbl_Office_Project.Text,
angefordert: galOptionaleSoftware.Selected.Checkbox1_22.Value,
installiert: galOptionaleSoftware.Selected.Checkbox1_23.Value
},
colBerechtigungen: {
Laufwerke: txt_Laufwerke.Text,
angefordert: galBerechtigungen.Selected.Checkbox1_32.Value,
installiert: galBerechtigungen.Selected.Checkbox1_33.Value
}
},
Mitarbeiter: DataCardValue2.Selected.DisplayName,
Computername: DataCardValue3.Text,
Ticketnummer: DataCardValue4.Text
}
)
=============================
With the above, it works with only one row (record) being showed.
How can I add multiple rows in the 3rd Level Collection ?

colEintritt.pngcolEintritt_2.pngcolEintritt_3.png


With the method I know, it does not work:
colEintritt_4.png

Any respone would be appreciated. I can't go further because of this.

Thank you in advance !


Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    To get multiple records at any level for a field you need to specify those records as an array of records.  Take a look at this sample. Level 3 is specified as an array using square brackets.

    ClearCollect(
     nestedCollection,
     {
     Title: "Level 1A",
     Level2: {
     Title2: "Level 2A",
     Level3: [
     {Title3: "Level 3A"},
     {Title3: "Level 3B"}
     ]
     }
     },
     {
     Title: "Level 1B",
     Level2: {Title2: "Level 2B"}
     }
    )
  • Bogdan Profile Picture
    36 on at

    Hi,

    Thanks! This is close, if not exactly what I need.
    One more question - is this the only solution as Value Arrays ? Is it not possible as simple data Records ?

    {

                    Standardsoftware: galStandardSoftware.Selected.lbl_Office365_2.Text,

                    angefordert: galStandardSoftware.Selected.Checkbox1.Value,

                    installiert: galStandardSoftware.Selected.Checkbox1_1.Value

                },

    {

                    Standardsoftware: galStandardSoftware.Selected.lbl_Office365_2.Text,

                    angefordert: galStandardSoftware.Selected.Checkbox1.Value,

                    installiert: galStandardSoftware.Selected.Checkbox1_1.Value

                }

  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    From what I've tested the first level assumes that multiple records are in an array (collection). But for any additional levels you must declare them explicitly.  If you take the collection and look at it in JSON format you can see that multiple records are always in an array. So, no I don't think you can nest multiple records at a different level in the same field unless they are put into an array.

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard