cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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

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
Highlighted
Super User
Super User

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

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Highlighted
Community Support
Community Support

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

Highlighted

@v-xida-msft 

 

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

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 (2,550)