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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Rules - Set Labels Vis...
Power Apps
Answered

Rules - Set Labels Visible - Button to set Invisible

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

In PowerApps I have rules set-up to make a gallery, rectangle box, and a close button visible once a certain field is selected from a drop-down box.  How do I make these same items invisible onSelect of the close button? 

 

Rules_v1.JPG

 

 

Categories:
  • xyzzyx666 Profile Picture
    170 on at

    Hi @Anonymous,

     

    Do you want to the Dropdown Select Items not show in the Gallery?

    I have tested by using Collection as next:

    20190108test.png

    Button_Start.OnSelect: ClearCollect(IceCream, {Flavor: "Strawberry",Quantity:300},{Flavor:"Chocolate",Quantity: 100})

    Dropdown1.Items:IceCream.Flavor

    Button_Close.OnSelect:ClearCollect(IceCream1,Filter(IceCream, Flavor<>Dropdown1.Selected.Value))

    Gallery.Items:IceCream1

     

    When clicking the Button_Close, the Dropdown1.Selected.Value will not show in the Gallery.

    20190108test1.gif

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @xyzzyx666 , Yes a drop-down is the initial driver.  Based on what is selected there's a pop-up box (created from with a gallery,button, & rectangle) that overlays another gallery.   It has a close button that I've been working on. 

     I currently have this behind the button OnSelect .    

    Concurrent

    (
    (Bttn.Visible = false),
    (Gallery7.Visible = false),
    (Rectangle4_1.Visible = false),
    (Rectangle4.Visible = false)
    )

     

     Also, I need to keep everything behind the overlay message box. 

    The drop-down that triggers the overlay box: 

    Overlaybox has behind the Visible : If (DD_ComboBox.Selected.Value = "Gen Info",true,false) 

    I removed it from the "Rules"  and added the If  to the visible on the Overlaybox controls/labels.  

     

     

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Do you want to display the overlay box based on the selected value within the Combo Box, and hide the overlay box via clicking the "Close" button?

    Have you grouped all controls within the overlay box (Pop-up box) that you mentioned?

    Based on the formula that you provided, I think there is something wrong with it. Currently, within PowerApps, we could not assign a value to a property of a control within another control directly.

    I have made a test on my side, please take a try with the following workaround:7.JPG

     

    8.JPG

    I have grouped all controls (Rectangle control, Gallery, button, etc) within Pop-up box (overlay box).

    Set the Visible property of the Group1 control to following:

    If(ComboBox1.Selected.Value="PowerApps", true, false)

    On your side, you should type:

    If(DD_ComboBox.Selected.Value = "Gen Info", true, false) 

    Within the Pop-up box, set the OnSelect property of the "Close" button to following:

    Reset(ComboBox1)

    On your side, you should type:

    Reset(DD_ComboBox)

    Please check the attached GIF screenshot for more details:

     

     

    In addition, you could also consider take a try with the following workaround:

    Set the OnChange property of your Combo Box (DD_ComboBox) to following:

    If(DD_ComboBox.Selected.Value="Gen Info", Set(IsShow, true), Set(IsShow, false))

    Set the Visible property of the Close button (Bttn) to following:

    IsShow

    Set the Visible property of the Gallery7 to following:

    IsShow

    Set the Visible property of the Rectangle4_1 to following:

    IsShow

     Set the Visible property of the Rectangle4 to following:

    IsShow

    Set the OnSelect property of the "Close" button to following:

    Set(IsShow, false)

     

    Best regards,

    Kris

    Test.gif
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-xida-msft   Thank you! Smiley Happy   The second solution you suggested using the on-change worked for the App.  

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard