cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Or Statement Syntax

I have a complex form with a number of fields where visibility is determined by the value of a field selected earlier in the form.  I've got visibility working, but I'm not sure if this is the most effecient way to accomplish this.

 

Visibility is true is that value is one of several possible values.  And there is no end to the number of varieties.

 

So one field's visibility could be set to:

If(RequestType.Selected.Id=3 || RequestType.Selected.Id=7 || RequestType.Selected.Id=2 || RequestType.Selected.Id=6 || RequestType.Selected.Id=10 || RequestType.Selected.Id=11, true, false )

 

But another's might be set to:

If(RequestType.Selected.Id=1 || RequestType.Selected.Id=2, true, false )

 

These both work, but just seem inefficient.

 

I was hoping I could do something like this as its much nicer looking, but it doesn't work (but i don't get errors either):

If(RequestType.Selected.Id=3||7||11, true, false )

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @wordsmither

I think you're looking for the 'in' operator. The syntax would look this:

If(RequestType.Selected.Id in [3,7,11], true, false )

View solution in original post

1 REPLY 1
Super User III
Super User III

Hi @wordsmither

I think you're looking for the 'in' operator. The syntax would look this:

If(RequestType.Selected.Id in [3,7,11], true, false )

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (78,509)