cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Asy
Level: Powered On

When a button is pressed

Hello,

 

I have three same types of screens : screen 1, screen 2 and screen 3.

Screen 2 (shown below) interacts directly with screen 1 and screen 3.

 

Les suivis.jpg

I would like for the icon cross on the left corner a Navigate function to screen 1 when one button in screen 1 is pressed or Navigate to screen 3 when one button in screen 3 is pressed.

So I would like to find the right formula to do this can you please help me ?

 

I tried this formula :

If(Button2_8.Pressed=true;Navigate(Screen1;Fade)) Or if(button2_14.Pressed=true;Navigate(Screen3;Fade))

 

But it doesn't work..

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: When a button is pressed

Hi @Asy ,

Could you please share a bit more about your scenario?

Do you want the icon cross in left corner to navigate to screen1 when one button in screen 1 is pressed or Navigate to screen 3 when one button in screen 3 is pressed?

 

Based on the formula that you provided, I think there is something wrong with it. Currently, within PowerApps, the Pressed property of the Button control could not be used to detect if a button has been clicked.

 

As an alternative solution, I think the global variable could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the Button2_8 button (which is a button in your Screen1) to following:

Set(TargetScreen; "Screen1")

Set the OnSelect property of the Button2_14 button (which is a button in your Screen3) to following:

Set(TargetScreen; "Screen3")

Then modify your formula as below (set the OnSelect property of the icon cross to following😞

If(
TargetScreen = "Screen1";
Navigate(Screen1; ScreenTransition.Fade);
TargetScreen = "Screen3"
Navigate(Screen3; ScreenTransition.Fade)
)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: When a button is pressed

In the On Select property of the icon you want to use to trigger the screen change, enter Navigate(Screen1,ScreenTransition.None). On Select represents the action to be taken when the object on the screen is selected/clicked.

In the example below, when the user clicks on the arrow head, the On Select executes 3 actions.  The first two are not important for your purposes.  The 3rd one is the one you need.  In my case, I move to the Summary screen.  There are 3 Screen Transition options - None, Cover, and Fade.  I use None most of the time.  The full syntax is as I showed you above ScreenTransition.None, but you can abbreviate in this command to just use the word None as I did in the example below.  So either Navigate(Screen1.ScreenTransition.None) or Navigate(Screen1, None) are equivalent.  

OnSelect.jpg

Community Support Team
Community Support Team

Re: When a button is pressed

Hi @Asy ,

Could you please share a bit more about your scenario?

Do you want the icon cross in left corner to navigate to screen1 when one button in screen 1 is pressed or Navigate to screen 3 when one button in screen 3 is pressed?

 

Based on the formula that you provided, I think there is something wrong with it. Currently, within PowerApps, the Pressed property of the Button control could not be used to detect if a button has been clicked.

 

As an alternative solution, I think the global variable could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the Button2_8 button (which is a button in your Screen1) to following:

Set(TargetScreen; "Screen1")

Set the OnSelect property of the Button2_14 button (which is a button in your Screen3) to following:

Set(TargetScreen; "Screen3")

Then modify your formula as below (set the OnSelect property of the icon cross to following😞

If(
TargetScreen = "Screen1";
Navigate(Screen1; ScreenTransition.Fade);
TargetScreen = "Screen3"
Navigate(Screen3; ScreenTransition.Fade)
)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Asy
Level: Powered On

Re: When a button is pressed

@v-xida-msft 

 

Thank you very much for your help this is exactly what I'm tried to do !

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,290)