Hi @ScottCodes, not sure if you already got direction from a source elsewhere but you are able to use “in” as part of the condition so it would be something like:
‘Montessori’ in person|lookup:’School Name’
which would help with the contains portion. Hope this helps!
Thanks!
And how do we write the reverse: ‘if the word ‘Montessori’ is not in the field ‘School Name’?
Here is a guess:
‘Montessori’ !in person|lookup:’School Name’
Thanks!
And how do we write the reverse: ‘if the word ‘Montessori’ is not in the field ‘School Name’?
Here is a guess:
‘Montessori’ !in person|lookup:’School Name’
@ScottCodes I don’t know if you’ve successfully implemented Paul’s suggestion, but if you got the “Invalid block condition” error after implementing the code, try using double quotes instead of single quotes.
Like this: "Montessori" in person|lookup:"School Name"
The reverse (or negative) version is to include “not” (without quotes) in front of the statement.
not "Montessori" in person|lookup:"School Name"
Hope this helps!
Thanks both @Paul S and @retention !
Will the conditional below that Paul S suggested work for a string?
The property “School Name” is a string.
Klaviyo’s documentation seems to suggest this structure works or searching arrays. But maybe it also works on a string?
not "Montessori" in person|lookup:"School Name"
And thank you for the help.
I’m MUCH happier with Klaviyo than Mailchimp which didn’t allow any conditionals like this. They save us so much time!
@ScottCodes That was my initial thought too.
After testing, it turns out that it works for strings too. I replicated the scenario you’ve presented and it worked for me.
Apply it as described above and test it yourself and be sure to monitor the first couple of emails send out in case we overlooked certain aspects.
Cheers!