Hi there,
I have two navigation galleries. One for mobile one for horizontal layouts. Both galleries have the following items:
Table(
{
Title: "";
Icon: "";
Context: "logo"
};
{
Title: "";
Icon: "";
Context: "vorigScherm"
};
{
Title: "Startpagina";
Icon: Icon.Home;
Context: "showDashboard"
};
{
Title: "Weekstaten";
Icon: Icon.Clock;
Context: "showMijnWeekStaten"
};
{
Title: "Projecten";
Icon: Icon.Folder;
Context: "showProjecten"
};
{
Title: "Urenoverzichten";
Icon: Icon.LogJournal;
Context: "showGoedkeuren"
};
{
Title: "Ploegen portaal";
Icon: Icon.People;
Context: "showPloegen"
}
)
Based on ThisItem.Context field actions are performed such as navigating and updating collections.
In my mobile navigation I want to have the exact same actions. Of course I could just copy paste the OnSelect code but I think a cleaner solution would be to use Select(Gallery;Row;Control). Someting like this:
Select(
NavigationVert;
LookUp(
NavigationVert.AllItems;
Context = ThisItem.Context
);
navigationSelectControl
)
Unfortunately I cannot get this to work. Is it possible to select a variable row+control from a button in another gallery?
Thanks in advance.
LGpower
.
Solved! Go to Solution.
Hi @lgpower ,
You could insert a number column in your second gallery.
I assume that the formula in the items property of your second gallery control 'NavigationVert' is:
Table({AAA:"a";BBB:"b"};{AAA:"c";BBB:"d"};{AAA:"e";BBB:"f"})
So, you should change the above formula to:
Table({AAA:"a";BBB:"b";Numbercolumn:1};{AAA:"c";BBB:"d";Numbercolumn:2};{AAA:"e";BBB:"f";Numbercolumn:3})
Then you could use this formula:
Select(
NavigationVert;
LookUp(
NavigationVert.AllItems;
Context = ThisItem.Context
).Numbercolumn;
navigationSelectControl
)
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
hi @lgpower just to clarify, when you click on the item you wish the navigation to take you to the form as per Context? if this is the case:
on the Onselect of the gallery, OnSelect = Navigate(ThisItem.Context,Transition.cover)
If you looking for something else, please explain a bit more.
hope this helps
Hi @rubin_boer,
Thanks for your reply.
Actually, I have most galleries within same screen. So one of the actions in the OnSelect is OnSelect = UpdateContext({showScreen:ThisItem.Context})
But yes, that is the general idea.
So this works for the Vertical Nav (no issues navigating what so ever).
What I am trying to achieve is the same behaviour in the horizontal Nav using OnSelect = Select(verticalNav,Row/Column,Control)
@lgpower im not 100% with you, do you mean the vertical control of the gallery itself?
Hi @lgpower ,
You could insert a number column in your second gallery.
I assume that the formula in the items property of your second gallery control 'NavigationVert' is:
Table({AAA:"a";BBB:"b"};{AAA:"c";BBB:"d"};{AAA:"e";BBB:"f"})
So, you should change the above formula to:
Table({AAA:"a";BBB:"b";Numbercolumn:1};{AAA:"c";BBB:"d";Numbercolumn:2};{AAA:"e";BBB:"f";Numbercolumn:3})
Then you could use this formula:
Select(
NavigationVert;
LookUp(
NavigationVert.AllItems;
Context = ThisItem.Context
).Numbercolumn;
navigationSelectControl
)
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
71 | |
48 | |
41 | |
30 |
User | Count |
---|---|
264 | |
121 | |
94 | |
89 | |
82 |