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?
Solved! Go to Solution.
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:
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
Hi @Anonymous,
Do you want to the Dropdown Select Items not show in the Gallery?
I have tested by using Collection as next:
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.
@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:
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
@v-xida-msft Thank you! The second solution you suggested using the on-change worked for the App.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
258 | |
122 | |
85 | |
75 | |
72 |