cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MiteshGovan
Post Patron
Post Patron

PopUp should occur only if a specific choice value is selected

Hi

 

I trust that you are well. I need some help with popup.

 

I just want to know how to set up a Popup if a selected choice value is chosen. When I select the I declare button the popup must only occur if a choice value chosen = "YES" other than that the Popup must not show.

 

I have tried the below formula but the Popup does not come up.

 

Can you please assist me?

 

 

MiteshGovan_0-1622928726887.pngMiteshGovan_1-1622928741878.png

Patch(
'Medical',
Defaults('Medical'),
Visitors_Form.Updates,
VistorsD_Form.Updates
);
NewForm(Visitors_Form);
NewForm(VistorsD_Form);
Notify("Thank You For Submitting The Data",NotificationType.Success);
ResetForm(Visitors_Form);
ResetForm(VistorsD_Form);
If(Radio_cough.Selected.Value ="Yes",UpdateContext({varShowPopup:true}),UpdateContext({varShowPopup:false}));
Navigate('Welcome Screen')

2 ACCEPTED SOLUTIONS

Accepted Solutions

That's normal. 

You have to put the navigate inside the condition after the false. Not outside the condition. 

Do this

dos757_0-1622982257292.png

 

 

View solution in original post

30 REPLIES 30
CNT
Community Champion
Community Champion

@MiteshGovan What's this pop-up that you are having? Do you have the visible of this pop-up set to varShowPopup?

I have grouped visible function to varshowpopup.

CNT
Community Champion
Community Champion

@MiteshGovan I don't understand. What control is this pop-up, Label? Button? Please share a screen shot and the formula.

Hi @CNT .

 

Popup is a button. Please see the attached. I hope it assists.

CNT
Community Champion
Community Champion

@MiteshGovan Is Group1 in the same screen where the button is?

Hi

 

The group1 is the pop-up.

The I declare button is the button when selected the pop-up requires to appear which is the group1. But it needs to see that the choice value is selected as "Yes". 

 

If a user selects the choice button as "No".  The pop up must not show up. 

 

The aim is once you select yes on the choice value and you press submit it will patch to sharepoint. But before it patches to sharepoint if it sees a "Yes". The pop up must show up. If "no", it shouldn't appear. 

 

CNT
Community Champion
Community Champion

@MiteshGovan Thanks for the explanation. But my question was,

Is Group1 in the same screen where the button is? Yes or No

Hi @CNT

 

Yes the Group1 is on the same screen as the I declare button. 

 

Thank you 

CNT
Community Champion
Community Champion

@MiteshGovan The problem is because, as soon as you set the variable to true, you are navigating to another screen!

Navigate('Welcome Screen')

The Popup is in another screen. It is visible but because you are navigating to the 'Welcome Screen', you can't see it. It's like you are trying to see 2 screens at the same time. That's not possible. Remove that Navigate and it will work.

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,444)