cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thanasis
Advocate II
Advocate II

Create a Button to close PopUp

Hello,

 

I was wondering if someone can help me with this . I have radio buttons for Yes and No. When someone clicks Yes a PopUp appears from them to write the reason the answered Yes. I did that with 

If(Rquestion1.Selected.Value="Yes",true,false)

 And I get this :

Thanasis_0-1611696504659.png

I have OnSelect for the close Button : 

UpdateContext({PopUp: false});

It does not work tho. The PopUp It is not closing. Any ideas ? Any Help I would truly appreciate.

 

Thank you 

 

4 ACCEPTED SOLUTIONS

Accepted Solutions
joeinmay
Resolver II
Resolver II

Step1:
On your Radio button Change property: If(Radio1.Selected.Value="Yes",Set(showpopup,"show"),Set(showpopup,"hide"))

Step 2:
Your popup (Label, Textinput, close button, Rectangle) has to be grouped say Group1
On the Group1 visible property: If(showpopup="show",true,false)

Step 3:
On the Close Button On Select Property: Set(showpopup,"hide")

Thats it.

View solution in original post

Correction:

 

Step1:
On your Radio button Change property: If(Radio1.Selected.Value="Yes",Set(showpopup,"show"),Set(showpopup,"hide"))

Step 2:
Your popup (Label, Textinput, close button, Rectangle) has to be grouped say Group1
On the Group1 visible property: If(showpopup="show",true,false)

Step 3:
On the Close Button On Select Property: Set(showpopup,"hide")

Thats it.

View solution in original post

@Thanasis 

Sorry about that...had a typo.

Your formula should be the following:

UpdateContext({PopUp: Self.Selected.Value="Yes"})

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

View solution in original post

RandyHayes
Super User III
Super User III

@Thanasis 

Yeah, you don't need all of that for this to work,  just fix the formula I resent.

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

View solution in original post

12 REPLIES 12
RandyHayes
Super User III
Super User III

@Thanasis 

You will need to utilize a variable for this to happen.

 

On the Radio control, use the OnChange action and set the formula to:

UpdateContext({PopUp: Self.Value="Yes"})

 

Set the Visible of your popup controls to PopUp

 

Set the OnSelect of your Close button to:

UpdateContext({PopUp:false})

 

I hope this is helpful for you.

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

Hello @RandyHayes 
Thank you for the answer.

When I change the OnChange I get this :

Thanasis_0-1611771699303.png

 

Just making sure, when you say, set the Visible of your popup controls to PopUp, you mean this right?

Thanasis_1-1611771699308.png

 

 

Thank you again for any help you can provide me.

GeigerCDill
Helper II
Helper II

Does clicking the "Yes" radio button update the context of the variable to true? And is the visible on your popup components set to the variable "PopUp"?

joeinmay
Resolver II
Resolver II

Step1:
On your Radio button Change property: If(Radio1.Selected.Value="Yes",Set(showpopup,"show"),Set(showpopup,"hide"))

Step 2:
Your popup (Label, Textinput, close button, Rectangle) has to be grouped say Group1
On the Group1 visible property: If(showpopup="show",true,false)

Step 3:
On the Close Button On Select Property: Set(showpopup,"hide")

Thats it.

View solution in original post

Correction:

 

Step1:
On your Radio button Change property: If(Radio1.Selected.Value="Yes",Set(showpopup,"show"),Set(showpopup,"hide"))

Step 2:
Your popup (Label, Textinput, close button, Rectangle) has to be grouped say Group1
On the Group1 visible property: If(showpopup="show",true,false)

Step 3:
On the Close Button On Select Property: Set(showpopup,"hide")

Thats it.

View solution in original post

Hello @joeinmay 

I did all of this but the close button when clicked one still not closing the PopUp.

Thanasis_0-1611773723458.png

 

Thanasis_1-1611773723461.png

 

Thanasis_2-1611773723466.png

 

Am I doing something wrong ?

 

Yes @joeinmay  that worked thank you very much 

@Thanasis 

Sorry about that...had a typo.

Your formula should be the following:

UpdateContext({PopUp: Self.Selected.Value="Yes"})

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

View solution in original post

RandyHayes
Super User III
Super User III

@Thanasis 

Yeah, you don't need all of that for this to work,  just fix the formula I resent.

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

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (97,777)