Is this possible in PowerApps?
For instance I have 2 screens, (named ScreenA and ScreenB) want to have same button in both screens, to navigate, is this possible?
On Select: Navigate (ScreenVAR,fade,done)
while onload for ScreenA has: Set (ScreenVAR, "ScreenA")
and onload for ScreenB has: Set (ScreenVAR, "ScreenB")
As far as I know, every screen has their own set of controls so an easy way could be just copying the button to each screen and then change their OnSelect or go your way:
ScreenA - OnVisible: Set(ScreenVAR, "ScreenB")
-- ButtonA: OnSelect: Navigate (ScreenVAR,fade,done)
ScreenB - OnVisible: Set(ScreenVAR, "ScreenA")
-- ButtonB: OnSelect: Navigate (ScreenVAR,fade,done)
Is this what you wanted to accomplish?
Hi @Eickhel, agreed they are 2 different buttons but i meant they have the same formula.
The below does not seam to work because of the topic of this discussion: Referring to a control via a formula? is this possible?
If you look at my PowerApp screenshot, at the left, the side menu used to be buttons, but imagine buttons for +40 screens. I developed the menu eventually via a Gallery, and i was sucessful automate the formula to take me to the right screen via gallry on select.
this is a the on select formula for the menu gallery
As you see, it is manually done, and this covers 3 screens only. I know I can use excel Concatenate to buld the formula for all screens, but i was thiking use a column in the gallery so my formula would be then super easy:
ScreenHomeOn Visible: Set(CurrentScreen,"Home")
ScreenProject On Visible: Set(CurrentScreen,"Project")
Menu Gallery OnSelect: Navigate(CurrentScreen, Fade, none)
The issue is that OnSelect is not dealing with the variable CurrentScreen as ScreenName. I used Text(CurrentScreen), same.
Hi @Eickhel, Thanks.
The problem is that in the proposed formula of
I have to call ScreenName for each option. And my objective is to calling screenname via a formula, so i dont make the furmula very long.
But it does not seams to be working
True but what about the another proposed solution?
It uses a collection of screens.
This might be the start to finda way, thanks for sharing! and thanks for being there..
link solution says
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)
I tried the easy scenario for testing:
the seconf line of the code gives an error: "The function 'Navigate' has some invalid arguments"
OK, I think I got a way. First I created a collection with all the screens of this test app (keep in mind the @):
Then I created a button with this code in the OnSelect:
You need to change the logic for when or where to navigate... but I think this might work for you.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.