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

Back Button within the same screen

I have a screen that has multiple controls (mostly buttons). These controls set certain variables to have different galleries and metrics filtered and visible.  I would like to use the back arrow icon on the screen. Once clicked it would set the previous looked at variables.

example:

 

Button1.onselect- UpdateContext({varbackbutton:"1"});Set(vartype,Management)

Back arrow Icon.Default-varbackbutton

BackArrowIcon.Onselect-If(varbackbutton="1",Select(Button1))

 

This works somewhat, i think i need a varcurrentbutton, then onchange,set varbackbutton  or something like that. 

 

I just want to do the last event. Any Ideas?

3 REPLIES 3
Highlighted
Super User
Super User

Re: Back Button within the same screen

If you want the back button to do what Button1 does, have you tried using the same OnSelect property for back button as that of button1? I am assuming between clicking on Button1 and the back button, there are other steps the user will take?

Let me know if I am missing any details.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Highlighted
Helper III
Helper III

Re: Back Button within the same screen

Ok. Ill try and explain it a little better. 

User clicks button1 (variables are set, showing different galleries and such)

User clicks button2(variables are set, showing different galleries and such)

User clicks button 3 within a gallery presented by button 2 (shows information regarding item in gallery)

User clicks the back icon goes back to only button2 variables, then clicks back again and button1 variables are displayed.

 

Does that make sense?

Highlighted
Super User
Super User

Re: Back Button within the same screen

"User clicks button 3 within a gallery presented by button 2 (shows information regarding item in gallery)"

Set a variable (say Button3ContentVisible) to true on the OnSelect of Button3. "Information regarding item in gallery" should have their visible property set to Button3ContentVisible.

Now the back button will have an OnSelect property set to:
Set(Button3ContentVisible, false)

Also on the OnVisible property of the screen, set the variable to false so that Button3 content is not visible by default.
Set(Button3ContentVisible, false)

Let me know if that meets your needs.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com




Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,119)