cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wordsmither
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
timl
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
timl
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (47,578)