cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FreddieV
Resolver I
Resolver I

Form - hide field if option is selected in drop-down?

I am new to power, apps and am no programmer. So far so good. I have a drop-down field in a form that looks like the below:

 

Transmittal-for.png

I want to make it so that if the end-user select either Project Approval (No Consultees) OR PFC Approval (Both) then some additional fields will become visible, but will otherwise remain hidden. I know how to do this for just 1 option, and it works perfectly, below:

 

If(
DataCardValue8.Selected.Value = "Project Approval (No Consultees)",
true,
false
)

 

However, I am unsure how to make it happen for more than 1. I found this resource: https://manueltgomes.com/reference/powerapps-function-reference/powerapps-if-function/ but it doesn't work:

 

 If(DataCardValue8.Selected.Value = "Project Approval (No Consultees)" && DataCardValue8.Selected.Value = "PFC Approval (Both)", true, false)

 

Please can someone help?

 

I feel like this should be really easy.

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@FreddieV 

 

DataCardValue8.Selected.Value = "Project Approval (No Consultees)" || DataCardValue8.Selected.Value = "PFC Approval (Both)"

 

in the Visible property of the cards that you want to hide/show

There is no need for the If() since this formula results in true  if either condition is true.  The || is the same as OR

View solution in original post

1 REPLY 1
Drrickryp
Super User
Super User

@FreddieV 

 

DataCardValue8.Selected.Value = "Project Approval (No Consultees)" || DataCardValue8.Selected.Value = "PFC Approval (Both)"

 

in the Visible property of the cards that you want to hide/show

There is no need for the If() since this formula results in true  if either condition is true.  The || is the same as OR

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (1,880)