cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Navigate to screen selecting element from the list (through list name)

navigateOnScreenThroughList.png

I have one list, and I created different screen with the same name like element of the list.

I get a list form the Rest call (and this rest call returns me a list containing this elements  [addition, multi ...] )

 
What I want is, when I select the element from the list, to navigate to the specific screen for this element.

 

I thought that is something like this: Navigate( ThisItem.workbookName , ScreenTransition.Fade) but I get the code error.

Can someone give me a hint how to solve this?

I also tried via UpdateContext, and to create a variable, but without success.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Navigate to screen selecting element from the list (through list name)

 

If you are using a dropdown or listbox control for the screen selection, please do the following:

 

    Dropdown1.Items = [Screen1, Screen2, Screen3]

    Dropdown1.OnChange = Navigate(Dropdown1.Selected.Value, Fade)

 

If you absolutely must use a gallery, you need to keep the mapping between screens and screen names yourself somewhere. This can be encoded either in logic (formulas) using the If() function, or in data, using a table/collection. Here's how to do the latter:

 

    xyz.OnSelect = Navigate(Lookup(Screens, Name = Gallery1.Selected.workbookName, Target), Fade)

    Screen1.OnVisible = ClearCollect(Screens, { Name: "Screen1", Target: Screen1 }, { Name: "Screen2", Target: Screen2 }, { Name: "Screen3", Target: Screen3 }, . . .  )

 

I hope this helps.

 

 

Radu Gruian [MSFT] ** PowerApps Staff

View solution in original post

9 REPLIES 9
Community Champion
Community Champion

Re: Navigate to screen selecting element from the list (through list name)

Hi

 

For each:

- TextBox or

- TextInput

   You can always have OnSelect. Navigate(ScreenName, Transition).

 

Since you are going to the screen with the SAME NAME as your WorkBookName, I would suggest that you name the screen that you wish to, with the same name as the WorkBookName.

 

Hope it helps.

(I remember there are some other threads, couple of months ago, talked about this by Sara. Please search if you can).

 

 

hpkeong
Highlighted
Advocate II
Advocate II

Re: Navigate to screen selecting element from the list (through list name)

Hi, but the thing is that this is a gallery with filled elements (list)....

I tried everything and does not work...
I cannot hardcode this with  Navigate(ScreenName, Transition), because Then for some other list I need to change this again... I need somethign like Navigate ( ThisItemSelected.workbookName , transition ) or with some variable. 

 

How can this be achieved?

Highlighted
Advocate II
Advocate II

Re: Navigate to screen selecting element from the list (through list name)

PS: I need somethign like this

 

Navigate( Gallery1.Selected.workbookName , ScreenTransition.Fade)

 

 

but this does not work ...

Highlighted
Community Champion
Community Champion

Re: Navigate to screen selecting element from the list (through list name)

Hi

 

I wish my simulation here can help you.

I am sure some others will have better approach compare to mine.

My idea is logic but guess, too, simple and too manually written.

Anyway hope you like it.

 

Got to define manually....:(...Got to define manually....:(...

 

 

Have a nice day.

hpkeong
Highlighted
Advocate II
Advocate II

Re: Navigate to screen selecting element from the list (through list name)

Thanks, but I was searching something to avoid writing the hardcoded thing   e.g. "if soomething ="malesia" " or so.

 

Cannot be done more automatic?

 

Highlighted
Power Apps
Power Apps

Re: Navigate to screen selecting element from the list (through list name)

 

If you are using a dropdown or listbox control for the screen selection, please do the following:

 

    Dropdown1.Items = [Screen1, Screen2, Screen3]

    Dropdown1.OnChange = Navigate(Dropdown1.Selected.Value, Fade)

 

If you absolutely must use a gallery, you need to keep the mapping between screens and screen names yourself somewhere. This can be encoded either in logic (formulas) using the If() function, or in data, using a table/collection. Here's how to do the latter:

 

    xyz.OnSelect = Navigate(Lookup(Screens, Name = Gallery1.Selected.workbookName, Target), Fade)

    Screen1.OnVisible = ClearCollect(Screens, { Name: "Screen1", Target: Screen1 }, { Name: "Screen2", Target: Screen2 }, { Name: "Screen3", Target: Screen3 }, . . .  )

 

I hope this helps.

 

 

Radu Gruian [MSFT] ** PowerApps Staff

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Navigate to screen selecting element from the list (through list name)

Hi

That's a much more better ideas and options.
I wish this will meet the requester's needs.
hpkeong
Highlighted
Regular Visitor

Re: Navigate to screen selecting element from the list (through list name)

This does not seem to work for me on the 2017 version. Can you please help?  

 

Thanks in advance. 

 

Highlighted
Post Prodigy
Post Prodigy

Re: Navigate to screen selecting element from the list (through list name)


@rgruian wrote:

 

If you are using a dropdown or listbox control for the screen selection, please do the following:

 

    Dropdown1.Items = [Screen1, Screen2, Screen3]

    Dropdown1.OnChange = Navigate(Dropdown1.Selected.Value, Fade)

 

If you absolutely must use a gallery, you need to keep the mapping between screens and screen names yourself somewhere. This can be encoded either in logic (formulas) using the If() function, or in data, using a table/collection. Here's how to do the latter:

 

    xyz.OnSelect = Navigate(Lookup(Screens, Name = Gallery1.Selected.workbookName, Target), Fade)

    Screen1.OnVisible = ClearCollect(Screens, { Name: "Screen1", Target: Screen1 }, { Name: "Screen2", Target: Screen2 }, { Name: "Screen3", Target: Screen3 }, . . .  )

 

I hope this helps.

 

 


Hi @rgruian 

can you show the formula above with exact sample? cuz, i dont really understand. 

Also, can we do it without using any collection? how?

 

i want to navigate my screen as well with gallery.

 

thanks.

pytbyt

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,710)