cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MShelnutt
Helper V
Helper V

Button's visibility contingent upon choice of a previous dropdown choice

Hi,

 

I have a PowerApp that is using a Edit Form.  It is pulling fields from a SharePoint file.  One of the fields (Warranty Claim?) is a dropdown with 2 choices- Yes or No.  I have 2 buttons at the bottom (Submit buttons).  They each have different actions upon selecting.  I want the appropriate button to be visible when the corresponding choice is made from that dropdown.  I keep getting an error when trying the formula for the Visible control.  Any suggestions?

Thank you.

3 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@MShelnutt 

What is the formula you have errors with?

 

In general, your Visible property of the button will be the following formula:

YourEditForm.Updates.WarrantyClaimColumn.Value = "Yes"

(or "No" depending on the button)

Replace names in the above formula based on your app names.

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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

@RandyHayes Ah! I had reordered these two buttons to the back...

I moved them back to the front and now they work.

Thank you!

View solution in original post

RandyHayes
Super User
Super User

@MShelnutt 

Is the Complaint Group column defined as multi-select in the list?

Your initial error seems to indicate that it is.

 

Although I don't typically recommend basing a formula off of a DataCardValue control, you could, in this case, use:

DataCardValue1.Selected.Value = "Defective Item"

for the Visible property.

 

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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

13 REPLIES 13
RandyHayes
Super User
Super User

@MShelnutt 

What is the formula you have errors with?

 

In general, your Visible property of the button will be the following formula:

YourEditForm.Updates.WarrantyClaimColumn.Value = "Yes"

(or "No" depending on the button)

Replace names in the above formula based on your app names.

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

It worked like a charm.  Thank you!

@RandyHayes , a follow up to this.  Would this "cloaking" feature affect the OnSelect controls?  When I play the app, nothing is happening when I click the revealed Button. 

Button3=

MShelnutt_0-1609873576624.png

Button2=

MShelnutt_1-1609873629842.png

 

 

 

RandyHayes
Super User
Super User

@MShelnutt 

No, your formulas all have & in them.  This is the concatenate text operator.  Replace all of those with ; semicolons. 

 

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@RandyHayes I made that change, however the 2 buttons are not even able to be clicked (same as before this change).  Nothing changes with my mouse pointer when I put it on the button (when visible), and the button is not changing colors like normal.  I have a 3rd button on the page at the top for "Cancel" which simply resets the form when clicked.  It responds when you hover over it with the mouse pointer.  The only difference between the settings on these is the Visible formula.  Thoughts?

RandyHayes
Super User
Super User

@MShelnutt 

What is your Visible property and what is your DisplayMode property for the buttons?

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@RandyHayes Ah! I had reordered these two buttons to the back...

I moved them back to the front and now they work.

Thank you!

RandyHayes
Super User
Super User

@MShelnutt 

That was going to be my next question ... 😁

Glad you have it working now!

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@RandyHayes Hi Randy.  I decided to make a change on which dropdown box would govern the visibility and function of my Submit button, but now I am getting an error-

 

MShelnutt_0-1610396672811.png

 

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 (2,847)