Skip to main content
Solved

Using Show/Hide Logic

  • January 15, 2024
  • 2 replies
  • 210 views

Forum|alt.badge.img+1

I am trying to use show/hide logic to add a button on my post purchase flow.

 

I want the button to only be displayed to purchasers who haven’t subscribed to marketing yet.

 

The show/hide logic I am trying to use is:

 

person|lookup:'Accepts Marketing' == 2

or person|lookup:'Accepts Marketing' == 'False'

or person|lookup:'Accepts Marketing' == 'false’

 

 

However, the button isn’t displayed even when the user isn’t subscribed. Please help!!

Best answer by bluesnapper

Welcome to the community @KSteam 

The display logic for your use case is:

person|lookup:'Accepts Marketing' == 0 or person|lookup:'Accepts Marketing' == 'false' or person|lookup:'Accepts Marketing' == 'False'

This covers all scenarios for how the data may be stored. Your button will display if any of the above conditions are true, i.e. they have NOT accepted marketing.

Hope that helps

Regards

Andy

2 replies

bluesnapper
Partner
Forum|alt.badge.img+45
  • Champion & Partner
  • 784 replies
  • Answer
  • January 15, 2024

Welcome to the community @KSteam 

The display logic for your use case is:

person|lookup:'Accepts Marketing' == 0 or person|lookup:'Accepts Marketing' == 'false' or person|lookup:'Accepts Marketing' == 'False'

This covers all scenarios for how the data may be stored. Your button will display if any of the above conditions are true, i.e. they have NOT accepted marketing.

Hope that helps

Regards

Andy


Forum|alt.badge.img+1
  • Author
  • Contributor II
  • 3 replies
  • January 15, 2024

Thanks so much! This has worked. Really appreciate it.