I have a gallery galNav1 and wish to have a button (OnSelect) select the 2nd row in that gallery. I am attempting to use the following syntax (on the same screen), but powerapps keeps underlining the formula in red. Any suggestions how to correct my syntax?
Select(galNav1, 2)
Thanks so much!
Exactly, there is something wrong with Select() function.
I will submit this issue to the PowerApps Team. If there is any update, I will post back.
Sik
Hi @Madumi
Can you try to set up the configuration like:
Gallery -> Default -> LookUp(ColMenuItems,screen = App.ActiveScreen)
Make sure that you apply the change on all the screens.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Thx @Anonymous
Hmmm, I'm not sure I'm quite following you on the:
AddColumns(YourDataSource,"screen",Lookup(ColMenuItems,id=[@id],screen))
(in my Gallery, my "YourDataSource" is ColMenuItems)... Powerapps doesn't seem to take the property...
Am I right thinking that your example will change the color to show which screen the user is on, but not actually select that row in the gallery? Is there a way to select that row in the gallery?
Got it! So on your gallery's Items property, you'll use something like this:
AddColumns(YourDataSource,"screen",Lookup(ColMenuItems,id=[@id],screen))
Then in your gallery, you can use this according to your example above
If(ThisItem.screen=App.ActiveScreen.Name,RGBA(255,255,255,1),RGBA(0, 0, 0, 1))
---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.
@Anonymous
Sorry, I wasn't as clear as I could be... What I am attempting to do is have the gallery row which corresponds with the current screen selection to also be selected *within the gallery* i.e. I need a visual indication of the currently selected row so the user can see the selection eg. If(ThisItem.IsSelected,RGBA(255,255,255,1),RGBA(0, 0, 0, 1))
I guess I'm looking for the mechanism to have that row in the gallery be selected as if the user had just clicked on that row (it's a situation where, having navigated from another screen, the row is not yet selected).
thanks!
Thx @Anonymous
Yes, I was also wondering if the functionality had somehow been retired...
The use case is that I have a gallery I'm using for navigation, based on a collection, and spread across four screens. Here's the collection:
ClearCollect(
ColMenuItems,
{
id: 1,
MenuLabel: "Projects",
screen: Screen1
},
{
id: 2,
MenuLabel: "Operating Units",
screen: Screen2
},
{
id: 3,
MenuLabel: "Managers",
screen: Screen3
},
{
id: 4,
MenuLabel: "Member Agencies",
screen: Screen4
}
)
Is there another, or a better way in which I can for example trigger menu id: 2 to be selected when the user navigates to Screen2? I have tried using Default on the gallery, but this doesn't work after the 1st navigation away from it (default seems to become cleared, and the last gallery item which was selected, remains selected when the user navigates back to this screen).
thanks!
I did find the functionality you need in the docs here
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-select
but I can't seem to get it to work. I'm not sure if this has been retired without being removed from docs, or if I'm missing something. I'll keep looking.
What is the use case here? I'm not sure this is possible, and there may be an easier way to accomplish this. I'll try to figure out a way to do this, though.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2