web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : aoOP6efA1njZBa+S+JH0wX
Power Apps - Building Power Apps
Answered

Dynamic screen reference in Navigation possible?

Like (0) ShareShare
ReportReport
Posted on 30 Dec 2016 18:48:03 by

Hello,

 

I have a table setup with a TableRef column which contains the name of the Screen I want to navigate. I want to click an icon in my gallery and dynamically go to whichever screen that gallery entry refers to

 

The way im thinking something like this should work:

 

OtherTablesGallery.OnSelect = Navigate(OtherTablesGallery.Selected.TableRef,ScreenTransition.None)

 

But it doesn't work, I see a solution here: 

 

https://powerusers.microsoft.com/t5/PowerApps-Forum/Navigate-to-screen-selecting-element-from-the-list-through-list/m-p/8980#M3943

 

But I don't understand completely what it is doing and if its suitable.

Categories:
I have the same question (0)
  • KashifZH Profile Picture
    35 on 23 Aug 2022 at 23:20:04
    Re: Dynamic screen reference in Navigation possible?

    Hi All,

     

    A much simpler way would be to create a collection inside which you can define a column for the screen itself (i.e. you pass in the screen name directly).

     

    Example:

    ClearCollect(colScreens,
    {ScreenName: "Moderation Master", Target: 'Moderation Master Screen', ScreenOrder: 1},
    {ScreenName: "All Questions", Target:'All Questions Screen', ScreenOrder: 2},
    {ScreenName: "Moderation Questions", Target: 'Moderation Question Screen 1', ScreenOrder: 3},
    {ScreenName: "Moderation Questions 2", Target: 'Moderation Question Screen 2', ScreenOrder: 4},
    {ScreenName: "Controls", Target: 'Controls Screen', ScreenOrder: 5}
    )

     

    Then, you can specify the 'OnSelect' button on your gallery to navigate to : ThisItem.ScreenName.

     

    Cheers.

  • Community Power Platform Member Profile Picture
    on 04 Mar 2019 at 00:56:31
    Re: Dynamic screen reference in Navigation possible?

    Hi,

     

    I have used the same exact formula as below. But nothing happens and the screen stand still.

    Formula in the On strat: ClearCollect(Screens,{Name:"Regular Pay",Target:RegularPay_Screen},{Name:"Payment Extension",Target:PaymentExtension_Screen})

    Formula on the button:Navigate(LookUp(Screens,Name=drp_DOARequiredFor.Selected.Value,Target),ScreenTransition.None)

    drp_DOARequiredFor is a drop down field and has the values, "Regular Pay","Payment Extension".

     

    Please help me understand why it is not navigating to the respective screen. Also please note that there is no error in the formula

     

  • Community Power Platform Member Profile Picture
    on 08 Oct 2017 at 22:30:38
    Re: Dynamic screen reference in Navigation possible?

    Guys, I am new to PowerApps, I am using multiple screens (BroswerGallery) for Data view based on filters of same data source. Since the data format is same for all, I don't want multiple View, Add & Edit pages. Since upon each action it looks for a data source, I am finding difficult to use a single view, add & edit page. 

     

    Need your help and step by step guidance.

     

  • Community Power Platform Member Profile Picture
    on 27 Sep 2017 at 13:57:37
    Re: Dynamic screen reference in Navigation possible?

    Where do I enter this function: 

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

     

     

  • Community Power Platform Member Profile Picture
    on 01 Jan 2017 at 00:52:08
    Re: Dynamic screen reference in Navigation possible?

    That works brilliantly, thank you for the extra explanation.

     

    Perhaps a function could be added to turn a text value into a screen object e.g.

     

    Object("ScreenName")

  • Verified answer
    irinak Profile Picture
    on 30 Dec 2016 at 20:34:50
    Re: Dynamic screen reference in Navigation possible?

    Hi IanN,

     

    The trick here is that you need to pass the screen as an object instead of just using the name. The post you found shows an example on how to do that.

      

    1) Create a collection that has a mapping from screen name to screen object. For example:

     

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

     

    You can set the above when the first screen loads, i.e. Screen1.onSelect

     

    2) Set your onSelect action to:

     

    Navigate(Lookup(Screens, Name = OtherTablesGallery.Selected.TableRef, Target), None)

     

    Hope this works for you!

     

    Irina

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 892 Most Valuable Professional

#2
Power Apps 1919 Profile Picture

Power Apps 1919 356

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 310 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete