Solved

Using Show/Hide Logic

  • 15 January 2024
  • 2 replies
  • 101 views

Badge

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!!

icon

Best answer by bluesnapper 15 January 2024, 19:06

View original

2 replies

Userlevel 7
Badge +37

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

Badge

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

Reply