does anyone know of a Saved Search formula for com...
# general
u
does anyone know of a Saved Search formula for comparing two fields' text values together? for context, i'm trying to find a Criteria Formula for isolating customers whose
entityid
values aren't equal to their
companyname
values, but I can't seem to make a formula that covers all records that matches that. The closest SQL Expression i could find that could run the search was CASE, and even that doesn't work. Anyone have ideas?
here's the formula i cobbled together that runs, but doesn't give me the desired result:
Copy code
CASE WHEN {entityid} LIKE {companyname} THEN 'TRUE' ELSE 'FALSE' END
w
Either
case when {entityId} = {companyname}
or
case when {entityId} like(‘%’ || {companyname} || '%')
the latter will give true if the entityid is anywhere in the companyname. Then if you return 'TRUE' or 'FALSE', make sure that it is a text formula that 'is TRUE'
✅ 1
u
that little tip about the
(Text) Formula
being configured to
is: TRUE
seemed to be what i was lacking. I initially just left it to
is not empty
seeing as the output couldn't be null anyway. thanks for this.
m
CASE WHEN {entityid} != {companyname} THEN 'TRUE' ELSE 'FALSE' END