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

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

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

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

@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.
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

MShelnutt
Helper IV
Helper IV

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

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

@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.
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!

View solution in original post

RandyHayes
Super User III
Super User III

@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.
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
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 (1,163)