Start with the core pattern
In Oculon, conditional logic follows this pattern:Common uses for conditional logic
Conditional logic is especially useful when you need to:- switch between
actual formulaandplanned formulabehavior - apply different logic to different months or quarters
- return flags such as
1and0for active or inactive states - protect a formula from blank or missing values
- handle exceptions without rewriting the full formula
Combine conditions with and and or
Useand when multiple conditions must all be true. Use or when any one of the listed conditions should trigger the branch.
Use in and not in for list-based rules
Usein and not in when you want one formula to react to a defined list of values.
Handle nested conditions carefully
Nested conditions are valid, but they become difficult to review quickly.Use conditional logic around the Last actual date
One of the most common formula patterns is a cutoff-based switch.Last actual date instead of a hard-coded month.
When to move branches into helper variables
Use a helper variable when:- the same condition appears in more than one formula
- the formula mixes business logic and exception handling
- a reviewer would need to read the line twice to understand it
- the condition is important enough to deserve a clear name
Common mistakes
Watch for these issues:- hiding cutoff logic inside a long nested expression
- mixing hard-coded dates with
Relative timelogic - using many branches when one helper variable would be clearer
- returning blanks or text values when the downstream formula expects a number

