cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Help with using visible IF function for two values

Hello,

 

I have a "choice" datacard value field that has three options. The selectable choices are as follows:

No
Standard Depth/Velocity Confirmation
Full Velocity Profile (Flow >5in / 12.7cm)

 

I am trying to get a portion of my form to visible if EITHER "Standard Depth/Velocity Confirmation" OR "Full Velocity Profile (Flow >5in / 12.7cm)" is selected.

 

I am having trouble getting this functionality. So far I have tried the following:

If((DataCardValue36.Selected.Value = "Standard Depth/Velocity Confirmation") && (DataCardValue36.Selected.Value = Full Velocity Profile (Flow >5in / 12.7cm)), true, false)

 This results in the portion of the form not being visible at all and does not change for either option. Am I doing something obvious wrong? Thanks for any help in advance. 

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: Help with using visible IF function for two values

@SamR 

Try

If((DataCardValue36.SelectedItem <> "No", true, false)

 

 

Highlighted
New Member

Re: Help with using visible IF function for two values

Thanks @Eelman  for the input! I gave it a try but unfortunately no luck. I will keep looking for a solution. It can't be that complicated haha. 

Highlighted
Super User III
Super User III

Re: Help with using visible IF function for two values

@SamR 

In the Visible property of the items in question, you should be able to dispense with the If() function since the statement

 

DataCardValue36.Selected.Value <> "No"

 

reduces to either true or false.   To test  make DataCardValue36.Selected.Value the Text property of a label on the screen and adjust the Visible property accordingly.

Highlighted
Community Support
Community Support

Re: Help with using visible IF function for two values

Hi @SamR ,

If following your logic, the formula should look something like this, just need to satisfy one of two conditions.

 

If(DataCardValue36.Selected.Value = "Standard Depth/Velocity Confirmation" || DataCardValue36.Selected.Value = "Full Velocity Profile (Flow >5in / 12.7cm)", true, false)

 

@Drrickryp's code is more concise, the code self returns a boolean value, so IF function is not required, directly check that the "NO" option is not selected.

Hope this helps.

Sik

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,827)