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 III
Super User III

@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 III
Super User III

@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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,738)