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.