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 / Nested tables in power...
Power Apps
Answered

Nested tables in power apps

(0) ShareShare
ReportReport
Posted on by 5

Hello community, I wish you success in your activities, I am new to power fx formulas in power apps, and I have questions about how to work with nested tables, I try to create a side menu with sublevels that loads according to the user who enters the app.

Create a collection with a table initially like this:

 

ClearCollect(
colMenu;
Table(
{
MenuLabel: "Home";
MenuIcon: Icon.Home;
MenuScreenNavigate: Inicio;
MenuID: 1
};
{
MenuLabel: "Human Resources";
MenuIcon: Icon.People;
MenuScreenNavigate: InicioRRHH;
MenuID: 4
};
{
MenuLabel: "TI";
MenuIcon: Icon.Laptop;
MenuScreenNavigate: InicioTI;
MenuID: 5
}
)
)

 

And what I want to do is add a new column called submenu that also contains similar objects in another table, under an if condition, this condition goes according to the type of user that uses the application.

 

Can I insert a new column containing a table using Patch?

 

I want to get something like this:

{
MenuLabel: "TI";
MenuIcon: Icon.Laptop;
MenuScreenNavigate: InicioTI;
MenuID: 5;
SubMenu: Table(
{
MenuLabel: "subop 1";
MenuIcon: neural;
MenuScreenNavigate: screen11;
MenuID: 1
};
{
MenuLabel: "sub op 2";
MenuIcon: outlook;
MenuScreenNavigate: screen12;
MenuID: 2
};
{
MenuLabel: "sub op 3";
MenuIcon: devops;
MenuScreenNavigate: Screeen 13;
MenuID: 3
};
{
MenuLabel: "sub op 4";
MenuIcon: dispositivo;
MenuScreenNavigate: Screen 14;
MenuID: 4
}
)
}

 

Thank you for your support and I look forward to your comments.

Categories:
I have the same question (0)
  • Verified answer
    charlessexton Profile Picture
    11 Super User 2024 Season 1 on at

    In your initial table, for each item add an empty table for the submenu:

     Table(
     {
     MenuLabel: "Home";
     MenuIcon: Icon.Home;
     MenuScreenNavigate: Inicio;
     MenuID: 1;
     SubMenu: Table()
     }

    Then you can patch to that column:

    Patch(
     colMenu;
     LookUp(colMenu; MenuID = 5);
     {
     SubMenu: Table(
     {
     MenuLabel: "subop 1";
     MenuIcon: neural;
     MenuScreenNavigate: screen11;
     MenuID: 1
     })
     }
    )
  • EStein Profile Picture
    5 on at

    Hello, thanks for your support it helped me :D, if I want to add more than one option to the submenu, can I add the options in a separate collection and then add them to the table in a single loop?

  • charlessexton Profile Picture
    11 Super User 2024 Season 1 on at

    Do you mean like this?

     

    Patch(
     colMenu;
     LookUp(colMenu; MenuID = 5);
     {
     SubMenu: Table(
     {
     MenuLabel: "subop 1";
     MenuIcon: neural;
     MenuScreenNavigate: screen11;
     MenuID: 1
     };
     {
     MenuLabel: "subop 2";
     MenuIcon: neural;
     MenuScreenNavigate: screen12;
     MenuID: 2
     })
     }
    )
  • charlessexton Profile Picture
    11 Super User 2024 Season 1 on at

    Yes, you can add them to a collection separately, and then patch the collection to the original menu collection.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 387

#3
timl Profile Picture

timl 344 Super User 2026 Season 1

Last 30 days Overall leaderboard