[Closed] Support with custom formula: "OR" not working as expected

WAllroggen
Participant

Closed: Preview only showed limited data - Formula works as expected.

Hi Community,
I am looking to create a field which should be true, if a contact has entered either the stage of marketingqualifiedlead OR salesqualifiedlead.

So, this is what I wrote:
IF (IS_KNOWN([CONTACT.hs_v2_date_entered_salesqualifiedlead]) OR IS_KNOWN([CONTACT.hs_v2_date_entered_marketingqualifiedlead]), true, false)

However, the result is actually only those contacts, for which both are true -> basicly what I would expect "AND" would do.

Looking forward to your ideas.
Thank you,
Willem

0 Upvotes
2 Accepted solutions
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Hi @WAllroggen,

 

Looks correct to me – could you share a screenshot of the configuration that shows the 'incorrect' behavior?

 

I would probably reach out to HubSpot support directly in-app via chat or email to check if this is expected behavior.

 

You could also try a nested if statement and see if that works: IF(IS_KNOWN([CONTACT.hs_v2_date_entered_salesqualifiedlead]), true,
IF(IS_KNOWN([CONTACT.hs_v2_date_entered_marketingqualifiedlead]), true, false))

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

View solution in original post

0 Upvotes
RubenBurdin
Solution
Top Contributor

Hi @WAllroggen , thanks for circling back and closing the loop. This one catches a lot of people, so it’s useful context for others reading later.

 

You’re right, the formula itself is valid. The confusion almost always comes from the preview behavior, not the logic. In HubSpot, the preview only evaluates against a limited sample of records, and it doesn’t guarantee representativeness across lifecycle edge cases. When you combine conditions with OR, that sample can look misleadingly “stricter” than reality.

 

In practice, once the property is saved and evaluated across the full contact set, IS_KNOWN(A) OR IS_KNOWN(B) behaves exactly as expected. Karsten’s nested IF suggestion is functionally equivalent, but not required if the preview is the only thing throwing you off. Good call to trust the actual data over the preview. This is one of those quiet HubSpot gotchas that isn’t obvious until you’ve been burned by it once.

Did my answer help? Please mark it as a solution to help others find it too.

Ruben Burdin Ruben Burdin
HubSpot Advisor
Founder @ Stacksync
Real-Time Data Sync between any CRM and Database
Stacksync Banner

View solution in original post

0 Upvotes
3 Replies 3
RubenBurdin
Solution
Top Contributor

Hi @WAllroggen , thanks for circling back and closing the loop. This one catches a lot of people, so it’s useful context for others reading later.

 

You’re right, the formula itself is valid. The confusion almost always comes from the preview behavior, not the logic. In HubSpot, the preview only evaluates against a limited sample of records, and it doesn’t guarantee representativeness across lifecycle edge cases. When you combine conditions with OR, that sample can look misleadingly “stricter” than reality.

 

In practice, once the property is saved and evaluated across the full contact set, IS_KNOWN(A) OR IS_KNOWN(B) behaves exactly as expected. Karsten’s nested IF suggestion is functionally equivalent, but not required if the preview is the only thing throwing you off. Good call to trust the actual data over the preview. This is one of those quiet HubSpot gotchas that isn’t obvious until you’ve been burned by it once.

Did my answer help? Please mark it as a solution to help others find it too.

Ruben Burdin Ruben Burdin
HubSpot Advisor
Founder @ Stacksync
Real-Time Data Sync between any CRM and Database
Stacksync Banner
0 Upvotes
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Hi @WAllroggen,

 

Looks correct to me – could you share a screenshot of the configuration that shows the 'incorrect' behavior?

 

I would probably reach out to HubSpot support directly in-app via chat or email to check if this is expected behavior.

 

You could also try a nested if statement and see if that works: IF(IS_KNOWN([CONTACT.hs_v2_date_entered_salesqualifiedlead]), true,
IF(IS_KNOWN([CONTACT.hs_v2_date_entered_marketingqualifiedlead]), true, false))

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

0 Upvotes
WAllroggen
Participant

Hi Karsten,

thank you. I just saw I was tricked by the preview - which showed less results in the combined formula in comparison to having only one field.

My formula is working as expected.
I will close this topic.

 

0 Upvotes