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

 

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
Highlighted
Community Champion
Community Champion

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

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

PS: I need somethign like this

 

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

 

 

but this does not work ...

Highlighted
Community Champion
Community Champion

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

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

 

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

Hi

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

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

 

Thanks in advance. 

 

Highlighted


@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,917)