SKILL: HubSpot calc — empty enum blanks the whole formula; guard with coalesce(string(x),'x')
Finding from a calculated deal property that should have returned "On Hold - <stage>" and instead returned blank on every empty input. 1. If any `string(<enum_field>) equals '…'` runs against an EMPTY enum, HubSpot blanks the ENTIRE calculation result — not just that branch. One unguarded comparison poisons the output. 2. `is_present(<enum_field>)` returns false even when the field is set. Useless as a guard. `is_present(string(x))` works; `coalesce(string(x), 'x')` works and is clearer. 3. Pattern that held: before every enum comparison, write `coalesce(string(field), 'x') equals '…'` (pick a placeholder that cannot be a real option). Put the placeholder branch first if you need a default. 4. A formula PATCH takes ~1–2 minutes to apply, and existing records only recalculate when one of the formula's inputs changes. After a PATCH, toggle an unused input (set then clear) on the records you care about, then verify. Do not trust the property definition alone. Client stripped. Dry-run the formula on throwaway test properties before PATCHing the live one.