cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
winwell
Frequent Visitor

How to get the name of active screen

I want to show the active screen name in a label.

 

Is there a way to get the name of the active screen? I can't see any obvious 'non manual' way to do it.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
dimi
Impactful Individual
Impactful Individual

9 REPLIES 9
dimi
Impactful Individual
Impactful Individual

Hi @winwell

 

I don't know of any pre built function that would do that but you could try this out: https://powerusers.microsoft.com/t5/General-Discussion/Navigate-to-a-screen-by-it-s-name/m-p/2454#M1...

 

Let me know if that helped you or not.

winwell
Frequent Visitor

Thanks but that doesn't really do what I wanted and after reading that post, looks like the functionality doesn't exist anyway. I'll just have to enter the screen name manually. Thanks anyway.
dimi
Impactful Individual
Impactful Individual

You can always submit the idea here: https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas/status-key/Started

 

I would vote for it Smiley Very Happy

Alternatively, in addition to your case, this might help you: https://powerusers.microsoft.com/t5/PowerApps-Ideas/Navigate-to-a-screen-by-name/idi-p/3680

 

Good luck!

v-yuxima-msft
Community Support
Community Support

Hi @winwell ,

 

What do you mean get the active way of the screen?

Do you mean you have many screens and the label shows the screen which is used?

I am afraid there is no the relate function to show the active screen in PowerApps currently, if

you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best Regards.

Yumia

Hi @winwell @dimi ,

 

Thanks for your posts and votes.

 

Best Regards.

Yumia

Emjee
Advocate II
Advocate II

App.ActiveScreen.Name

Reference

 

This is great for building navigation components:

1. App Settings > Advanced Settings > Experimental Features > Components > On

2. In the Tree view, select the Components tab.

3. Press New component and rename it. Try this naming style: cmpTitleBar

4. Change your component size. Try a height of 40 or 50.

5. Press New custom property and name it. Try this for Name: inpTitleBar

6. With Property type: Input and Data typeText, complete the dialog by pressing Save.

7. Now that your component is listening for that input, Insert a Label.

8. Connect by changing the label's Text property from "Text" to cmpTitleBar.inpTitleBar.

9. Lastly, change the component's input (inpTitleBar) to App.ActiveScreen.Name as a default value.

10. Name a screen and Insert Component to see the result.

What else can you add to your navigation component?

THIS is the solution

The example with using a "Component" is nice and useful in many ways.   Before components I have simply set a variable (varScreenTitle) and had a label in the header referencing the variable.  In the App OnLoad event I set the variable to for my start up screen.  In most cases the user will have to click a button or perform an action to navigate to a different screen. At this points you then reset the variable to a different name that matches the new screen prior to calling Navigate().  Simple but worked for me.

Bakertc384
Frequent Visitor

I have an issues with app.activescreen, 

i have a custom menu component where a component is visible based on what screen they are one. the customer component is side hamburger menu and is the same on every screen. 

there is a collection that hold all the menu data, 

Table(
{
MenuLabel: "Home",
MenuIcon: Icon.Home,
MenuID:1,
ScreenNav: 'Home Page'


when i enter say.... ThisItem.ScreenNav = app.activescreen.name in the visible property of the component 

 

it show red line under. seems like app.active screen is no longer working, 

 

any ideas ? 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,534)