In HubSpot, when you want to account for an unknown or no value situation within a calculated field, especially in nested IF statements like yours, you might need to explicitly check for those conditions. Unfortunately, HubSpot’s calculated fields don’t directly offer an “IS UNKNOWN” function, but we can work around this by using logical comparisons.
Your original formula is structured well, but to handle an unknown “custom_property” value, consider treating it as an empty string or explicitly checking for nullity, if the syntax and logic of your HubSpot environment allow. Since direct null checks might not always be straightforward, here’s a slightly adjusted approach that assumes an empty or null “custom_property” would not equal any of your conditions:
if([properties.dealstage] == “1234567”, if([custom_property] == “Option 1 Condition”, “Option 1 Result”, if([custom_property] == “Option 2 Condition”, “Option 2 Result”, if([custom_property] == “” OR [custom_property] IS NULL, “No Option Result”, “Unknown Condition”))), “Wrong Dealstage Result”)
In this adjusted formula, I’ve added an additional check to explicitly handle the case where “[custom_property]” might be empty (“”) or NULL. Please note, the OR and IS NULL are conceptual here, as the exact syntax might vary based on HubSpot’s current capabilities and your specific context. HubSpot’s formula syntax does not directly support an IS NULL check, so you might need to adapt this part. The key idea is to ensure you have a condition that captures the scenario where “custom_property” does not have a value.
If HubSpot’s calculated fields do not support checking for nullity in the way you need, another approach might be to ensure that “custom_property” always has a default value that you can check against, though this might not always be practical depending on your use case.
Remember, testing is your best friend here. Due to the specific syntax and behavior of calculated fields in HubSpot, you might need to adjust the formula slightly to fit the platform’s current functionalities.
---
Got help from https://www.spheroflow.com/ for this question. You just ask and it answers!!!