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.

13 REPLIES 13
RandyHayes
Super User
Super User

@MShelnutt 

What is Complaint Group defined as?  From what I see, it is a multi-select column.  Tell me more (screenshot of column definition would help too)

_____________________________________________________________________________________
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 

MShelnutt_0-1610397293288.png

 

MShelnutt_1-1610397347081.png

 

MShelnutt_2-1610397383095.png

 

The choices are "Defective Item", "Missing Components", "Wrong Components", and "Late Delivery".  I only want this button to show and work when "Defective Item" is selected.  The other button I have at the bottom will be the correct button when any of the other choices are chosen.

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

Hi Randy.

I have a dropdown where the user will pick one of three choices.  I have set 3 variables to correspond to the three.  I only want the subsequent DataCards associated with each of those choices to be visible.

 

This is what I have based on the Microsoft Doc for If and Switch functions:

 

If(DataCardValue4.Selected.Value= "Belts", UpdateContext({aVisible: true})[,DataCardValue4.Selected.Value= "Motors",UpdateContext({bVisible: true}) [,DataCardValue4.Selected.Value= "Rollers", UpdateContext({cVisible: true})]])

 

But the braces are not working (I think).  Can you take a look?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,748)