Skip to main content
Contributor IV
November 4, 2022
Solved

Can't put a period next to a Custom Property?

  • November 4, 2022
  • 3 replies
  • 100 views

In my template I have something like this:

 

texthere blabla {{ person|lookup:'amount'|default:'' }}.

 

So it should come out like: texthere blabla $126.

Instead it comes out like: texthere blabla $126 .

 

It puts a space between the custom property and the period while this space is unwanted by me nor put by me when I’m editing the template.

    This topic has been closed for replies.
    Best answer by David To

    Hey @blissy,

    Welcome back to the Community!

    I would suggest double checking to see if your profile property value actually has a trailing space. Leading or trailing spaces can cause this odd behavior. 

    Whenever you’re referencing a custom profile property using a lookup filter, it’ll return the exact value of the property being referenced. 

    Custom Profile Property 
    Template using {{ person|lookup:"Phone Type"|default:"" }}?​​​​​​
    What’s returned

    I hope this helps!

    David

    3 replies

    David To
    Klaviyo Employee
    David ToAnswer
    Klaviyo Employee
    November 7, 2022

    Hey @blissy,

    Welcome back to the Community!

    I would suggest double checking to see if your profile property value actually has a trailing space. Leading or trailing spaces can cause this odd behavior. 

    Whenever you’re referencing a custom profile property using a lookup filter, it’ll return the exact value of the property being referenced. 

    Custom Profile Property 
    Template using {{ person|lookup:"Phone Type"|default:"" }}?​​​​​​
    What’s returned

    I hope this helps!

    David

    blissyAuthor
    Contributor IV
    November 8, 2022

    Hey @blissy,

    Welcome back to the Community!

    I would suggest double checking to see if your profile property value actually has a trailing space. Leading or trailing spaces can cause this odd behavior. 

    Whenever you’re referencing a custom profile property using a lookup filter, it’ll return the exact value of the property being referenced. 

    Custom Profile Property 
    Template using {{ person|lookup:"Phone Type"|default:"" }}?​​​​​​
    What’s returned

    I hope this helps!

    David

     

    What’s a trailing space and what are you demonstrating with your example?

    David To
    Klaviyo Employee
    Klaviyo Employee
    November 8, 2022

    Hey @blissy,

    A trailing space is a space that is located after the final character in a text field. Similarly, a leading space that is located before the first character (letter, number, punctuation mark) in a text field. 

    In my screenshots, I’m demonstrating what I mentioned. That when you’re referencing a profile property, it’ll return the exact value of the property. 

    From my screenshots, the value I have set for the Phone Type property is “Apple Iphone”. When i’m referencing that property using “{{ person|lookup:"Phone Type"|default:"" }}?​​​​​​” it’s returned as “Apple Iphone?”.

    Note how because my property value has no trailing spaces, the question mark immediately succeed it. Same thing would occur if I used a period (.) instead of a question mark. 

    David