cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tony_malek
New Member

Pop up if Urgency selected is "High"

Hello.

 

I have built an IT ticketing system that uses PowerApps as the front-facing interface.

I have a drop-down with Items [" [Low]", " [Medium]", " [High]"]

This refers to the urgency of the issue the user is facing.

For "Reset" on this Urgency drop down I have Reset =  resetVar

 

The onSelect property of this Urgency drop-down looks like this If(Urgency.Selected.Value =" [High]", UpdateContext({l_Popup:true}))

 

This is working. Sort of. This is what should happen when "High" is selected:

tony_malek_0-1597170862746.png

 

This pops up. But not right away. When I select "High" from the Urgency drop-down this doesn't pop up as you'd expect. It's not until I click on the Urgency drop-down again with "High" already selected that it will trigger this pop up.

I'm pretty happy with how this is all running right now with the exception of that. My "OK" button in that pop-up is set to:

UpdateContext({ resetVar: true }); UpdateContext({ resetVar: false });
UpdateContext({l_Popup:false})

 

This is because I want the Urgency box to reset to no value again when they click OK. That works perfectly. I'm just not sure why the pop-up doesn't trigger as soon as High is selected from the drop-down. It's almost like it won't see that "High" is the selected value until it's clicked twice. Once to initially select it and then it's triggered as soon as you click the Urgency drop down again.

 

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@tony_malek 

You might want to consider looking at this from another approach.  Instead of trying to set variable on the OnSelect (which will give you the partial results that you are looking for), instead ditch the variable and reference the control directly.

Also, to then use an acknowledgment variable to clear it.

 

Set the Visible property of your Pop Up to this : Urgency.Selected.Value = "High" && !Acknowledged

Then, set the OnSelect action of your "OK" button to this:  UpdateContext({Acknowledged:true})

This will result in a true statement when the dropdown is set to high and they have not acknowledged the OK button.

 

As an added way to "return" that process, I would then set the OnSelect action of the Urgency dropdown to the following: UpdateContext({Acknowledged:false})

That way if they select a different and then back to high, they will get the message again.  That's a design choice for you.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@tony_malek 

You might want to consider looking at this from another approach.  Instead of trying to set variable on the OnSelect (which will give you the partial results that you are looking for), instead ditch the variable and reference the control directly.

Also, to then use an acknowledgment variable to clear it.

 

Set the Visible property of your Pop Up to this : Urgency.Selected.Value = "High" && !Acknowledged

Then, set the OnSelect action of your "OK" button to this:  UpdateContext({Acknowledged:true})

This will result in a true statement when the dropdown is set to high and they have not acknowledged the OK button.

 

As an added way to "return" that process, I would then set the OnSelect action of the Urgency dropdown to the following: UpdateContext({Acknowledged:false})

That way if they select a different and then back to high, they will get the message again.  That's a design choice for you.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

tony_malek
New Member

I've switched to Radio buttons. Now as soon as "High" is selected my pop up is triggered. I've removed the ResetVar too as if I don't it will just keep re-appearing every time a user genuinely wants to select a High priority option.

Thanks very much! I just seen this after implementing my other solution (just posted a minute ago). I'll look into yours as it seems a better way of doing it.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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