cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Rules - Set Labels Visible - Button to set Invisible

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

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

4 REPLIES 4
xyzzyx666
Resolver I
Resolver I

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

 

 

Anonymous
Not applicable

@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.  

 

 

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

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.
Anonymous
Not applicable

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

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,258)