cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Navigate to Screen based on Gallery Item Selection,Thisitem.TargetScreen.

Hello,
I have created Menu's Collection and bind to gallery control. I want to open respective screens on click of Gallery items. I have tried below option, 1.Navigate(ThisItem.TargetScreen,Transition.None); 2.Set(TargetScreen,Text(POSCustomer.Selected.TargetScreen)); Navigate(TargetScreen,Transition.None); Getting errors- 1.The function 'Navigate' has some invalid arguments. 2.The First argument of 'Navigate'should be a control or screen. Please help for this.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User II
Dual Super User II

Hey!

 

Currently navigation to a certain screen feature is not supported by powerapps, The first argument of the Navigate function must be a Screen Name, it cannot be a variable.
 
But, As a workaround, if you have a certain number of screens, then you can apply a condition based on the matching screen name. Please have a look at the screenshot below: 
 
MicrosoftTeams-image (20).png

 

If(ThisItem.Value = "Screen1",Navigate(Screen1,ScreenTransition.Fade), ThisItem.Value = "Screen2",Navigate(Screen2,ScreenTransition.Fade),ThisItem.Value = "Screen3",Navigate(Screen3,Fade))
 
Here, ThisItem.Value is the Screen Name that is selected as part of Gallery Item, please replace this with "ThisItem.TargetScreen" as used in your collection.
 
Hope this helps. 
 
Thanks, 
 
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!

View solution in original post

1 REPLY 1
Dual Super User II
Dual Super User II

Hey!

 

Currently navigation to a certain screen feature is not supported by powerapps, The first argument of the Navigate function must be a Screen Name, it cannot be a variable.
 
But, As a workaround, if you have a certain number of screens, then you can apply a condition based on the matching screen name. Please have a look at the screenshot below: 
 
MicrosoftTeams-image (20).png

 

If(ThisItem.Value = "Screen1",Navigate(Screen1,ScreenTransition.Fade), ThisItem.Value = "Screen2",Navigate(Screen2,ScreenTransition.Fade),ThisItem.Value = "Screen3",Navigate(Screen3,Fade))
 
Here, ThisItem.Value is the Screen Name that is selected as part of Gallery Item, please replace this with "ThisItem.TargetScreen" as used in your collection.
 
Hope this helps. 
 
Thanks, 
 
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!

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Users online (76,381)