Skip to main content
Solved

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

  • December 12, 2023
  • 2 replies
  • 198 views

Forum|alt.badge.img+1

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"

 

 

 

Best answer by MikeR00

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

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

bluesnapper
Partner
Forum|alt.badge.img+45
  • Champion & Partner
  • 737 replies
  • December 13, 2023

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


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • Answer
  • December 13, 2023

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