web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Clear / Reset Gallery ...
Power Apps
Answered

Clear / Reset Gallery Controls

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

I have a free-standing Radio control and a Gallery (all the green). When the user selects a Radio control option a formula changes the Gallery Visible to 'true' and a Variable changes the Radio control DisplayMode to 'Disabled'.

In the Gallery:

     Three Combo Boxes: Combo Boxes are a series of dependencies based on the first (Combo Box 1). If it is empty the others

     default empty.


     Checkbox: Switched by user as needed.

 

     Button: Reset button resets Combo Box 1, Checkbox, and contains the Variable to put the Radio control back to 'Edit'.

Everything works fine. The process includes and review screen where the 'Submit' button is located. When submit is clicked the user is navigated back to screen 1, where the existing data remains. Is there a way to activate the 'resets' shown below from screen 2 or when screen 1 "returns" from screen 2?

 

 

Reset(PSMCategoryTypeRadioBtn) & Reset(PSMCategoryCommodityCB) & Reset(PSMGalleryCategoryCommodityImmediateNeedCheckbox) & UpdateContext(({rbMode:DisplayMode.Edit}));

New Screen Look:

Phineas_1-1646339475378.png

 

Radio Control Option Selection Made:

Phineas_2-1646339562642.png

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Phineas 

    You cannot reset the controls in a gallery directly from outside of the gallery.

    Also, for your formula, there is no value in concatenating the text results of Reset - as there are none.  When you chain functions together, separate them with semicolons, not ampersands.  Semicolon is the function chaining, ampersands are for concatenating strings/text.

     

    Anyway, the easiest thing to do is to key off of your screen change.

    Change the Reset property of your controls to: !(App.ActiveScreen.Name = "nameOfYourScreen")

    This way, when the screen changes, the controls will reset.

     

    I hope this is helpful for you.

     

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Thank you for the clarification on the & vs. ;

    I've made the change.

    To the reset recommendation I understand, and it does work. However, it won't work here as is; there is also a 'Close View' button on screen 2 next to the submit button. If the user determines they need to update the entries, they can return to screen 1, make the change and return to screen 2 to submit.

    This would clear the existing entries, yes?

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Phineas 

    Yes, you had not mentioned other scenarios around what you needed.  The suggestion provided was based simply off of what was described to be a single screen to screen change need.

     

    In this case, I would base the formula off of a variable that you would set on the other option (Close View).

    For example, setting a variable such as this on the button:  Set(glbCloseView, true)

    And then change the Reset property suggested to:

    !(App.ActiveScreen.Name = "nameOfYourScreen") && !glbCloseView

    This will keep the controls from resetting in that scenario, but reset them at other times.

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Awwww man!

    Yep, that works, too, but there is a another cost. 

    There user has the ability, through the use of the screen 1 'View Saved' button, to navigate to screen 2 to review their choices before submitting (where the 'Close View' button above is also located).

    The 'preview' transition from screen 1 to screen 2 erases the data, so as configured this don't work.

    There is a need to pick the data in the combo boxes, transition to screen 2 to review, transition back with existing data as desired, submit final review and be transition back to a new screen 1.

    Everything to this point works at recommend. Just need to figure out how to add this screen 1 'View Saved' without erasing existing.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Phineas 

    Yes, so all you need to do on those places where you DON'T want the controls to reset is to include a Set(glbCloseView, true) 

    Might want to rename that variable to something more meaningful...I had named it off of the last post.

    So, perhaps, change the name to glbKeepValues  Then, everywhere you want to make sure you keep the values just put in the set statement...that will keep the controls from resetting.

     

     

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Those places (Combo Box 1) I don't want to reset when the 'View Saved' button transitions the user to screen 2, is the place I don't want the 'Close View' button to erase when coming back from screen 2 to screen 1 for a quick edit; and is the place I want cleared when the screen 2 'Submit' button is clicked.

     

    Again, the tasks:
    1. Be able to choose from the combo box and transition to screen 2 without deleting data

    2. Be able to transition back to screen 1 from screen 2 (with 'Close View' button) without erasing existing screen 1 data from Combo Box 1.
    3. Be able to submit data to data source using 'Submit' button and transition user back to screen 1 where the Combo Box (and its dependents have been reset.


    Current Understanding of Instructions:
    Screen 1: 'View Saved' button = Set(glbKeepValues, true)
    Screen 2: 'Close View' button = Set(glbCloseView,true)

    Combo Box 1; glbKeepValues; glbCloseView

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Can we finish this; is the above doable?

    Thanks!

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Phineas 

    As mentioned last, you would simply need to set the glbKeepValues to true whenever you perform an action where you want them to stay.  That action can be an OnSelect or an OnVisible, or OnHidden...just depends on where you want to ensure the values stay.

    Your formula on the reset should still be:

    !(App.ActiveScreen.Name = "nameOfYourScreen") && !glbKeepValues
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    I've almost gotten it.

    In Reset property of Combo Box 1 and Checkbox 1 I have -


              !(App.ActiveScreen.Name = "EventRegistrationForm") && !glbKeepValues && glbCloseView

     

    In the screen transition buttons 'View Saved' (screen 1 to 2) and 'Close View' (screen 2 to 1) OnSelect property I have -

              Set(glbKeepValues, true)

    In the screen 2 'Submit' button I have -

              Set(glbCloseView, true)

    The screen transition commands are working fine. However, the Combo Box (the only one I'm testing) is not resetting when I click the screen 2 'Submit' button.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Phineas 

    You really don't need the glbCloseView.  That was an initial variable based on one of your posts.  You later expanded to include other scenarios, so that was changed to be the glbKeepValues...that is really the only one that you need to concern yourself over.

    So, your screen 2 submit button should really just be: Set(glbKeepValue, false)  then your combobox will reset.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard