cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vandam2
Helper IV
Helper IV

Set Variable depeding on choice from ComboBox

I would like a popup box come up depending on the selection from a combobox

 

Column = Request_Type

Pick Lists = IT Hardware / Software Support / Karls Table / Powermic / Other

 

if someone selects Karls Table, i would like to have a popup box come up, thinking i need to add an if statement to the onchange property?

 

can we add a popup box depending on the selection of the dropdown?

 

added screenshot

1 ACCEPTED SOLUTION

Accepted Solutions
Alex_10
Super User
Super User

@vandam2 

 

DataCardValue6.OnChange = 
If(Self.Selected.Value = "Karls Table",
    UpdateContext({ctxShowww: true}),
    UpdateContext({ctxShowww: false})
);


Popup.visible = 
ctxShowww && DataCardValue6.Selected.Value1 = "Karls Table"

buttonInsidePopup.OnSelect = 
UpdateContext({ctxShowww: false})

 

View solution in original post

3 REPLIES 3
Alex_10
Super User
Super User

@vandam2 

 

DataCardValue6.OnChange = 
If(Self.Selected.Value = "Karls Table",
    UpdateContext({ctxShowww: true}),
    UpdateContext({ctxShowww: false})
);


Popup.visible = 
ctxShowww && DataCardValue6.Selected.Value1 = "Karls Table"

buttonInsidePopup.OnSelect = 
UpdateContext({ctxShowww: false})

 

SebS
Memorable Member
Memorable Member

@vandam2 

 

OnVisible property of the screen add:

 

 

 

Set(varPopUp, false)

 

 

 

 

In the OnChange property of the combobox add:

 

 

 

If(Self.Selected.Value ="Karls Table",Set(varPopUp,true))

 

 

 

Now depending on how You create a popup Box if it's a container what I recommend place in the Visible property of the container

 

 

 

varPopUp

 

 

 

If You use something else add this above code to all controls that make the popup to make sure they show up or disepire

 

Also You will need to add Icon or button to close the popUp add below code to OnSelect property of that control

 

Set(varPopUp, false)

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

thank you, worked like a charm

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,421)