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
yashag2255
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
yashag2255
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (39,810)