Skip to main content
Contributor II
January 15, 2024
Solved

Using Show/Hide Logic

  • January 15, 2024
  • 2 replies
  • 320 views

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

    This topic has been closed for replies.
    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
    Champion & Partner
    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

    https://bluesnapper.com - Klaviyo Champion '24 & Partner
    KSteamAuthor
    Contributor II
    January 15, 2024

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