Why is a field not hidden even though there is a layout rule to hide it?
If there are two layout rules that hide the same field, this is expected behavior.
The layout rule behavior is:
- The rules are evaluated by priority, the ones at the top being the lowest priority
- A rule with higher priority can potentially override the result of a lower priority rule
Meaning if rule 1 resolves to TRUE (hide section) and rule 2 resolves to FALSE (show section), the section will be displayed; if rule 1 resolves to FALSE and rule 2 resolves to TRUE, the section will be hidden.
One rule has this condition:
event_object_type__cr.name__v='Test Event' hide Inspection, Country fields
While the other has this condition:
event_object_type__cr.name__v='Safety Event' hide Inspection, Finished Product Samples fields
In this case, as both rules hide the same field, Inspection, the last one is higher priority, so the last one will always win.
To solve this, remove the Inspection field from these layout rules and create a new rule for it, then add a rule expression such as the following:
event_object_type__cr.name__v='Test Event' || event_object_type__cr.name__v='Safety Event' hide Inspection