Solved

Editor show/hide logic and syntax for multiple options of same property

  • 12 December 2023
  • 2 replies
  • 75 views

Badge

Need some syntax help displaying content blocks within the editor for a customer property that matches multiple different options.

Example depending where customer data is pulled from, one of our resorts could be called

“OrlandoResortLongName”  or  “OrlandoResortShort”   

 

 I have tried these two different examples, however neither seem to work correctly.

person|lookup:'Resort' == 'OrlandoResortShort' or person|lookup:'Resort' == 'OrlandoResortLong'

person.Resort=="OrlandoResortShort" or person.Resort== "OrlandoResortLong"

 

 

 

icon

Best answer by MikeR00 13 December 2023, 16:41

View original

2 replies

Userlevel 7
Badge +37

Welcome to the community @MikeR00 

This display logic syntax looks good to me: person|lookup:'Resort' == 'OrlandoResortShort' or person|lookup:'Resort' == 'OrlandoResortLong' - the block should display if either is a match.

It’s worth checking the values for these custom properties for capitalisation as display logic is case-sensitive. For example, ‘OrlandoResortLong’ will not work if the value is ‘orlandoresortlong’ or similar. 

Regards

Andy

Badge

I was able to get it working using this format 

person.Resort=="StringOne" or person.Resort=="StringTwo" or person.Resort=="StringThree"

 

For some reason the space after person.Property before the == seemed to be causing the issue.  when I removed it everything seemed to work fine. 

 

Strange because most of the guides/examples have spaces

Reply