Recently I came across a strange behavior on SugarCRM formula builder.
What I wanted to do is Hide/Show fields based on other field condition.
In studio I checked the Dependent checkbox and I add the condition like so for my Status textbox
equal($stage_complete_c, "true")
My Status text box will be visible if $stage_complete_c = true.
So far so good. The textbox is indeed hidden if the $stage_complete_c = false and will appear when the value = true.
However this only applies to the EditView which is pretty strange.
When I click the save button and I go to DetailView my Status textbox is still hidden eventhough $stage_complete_c value = true.
The solution that I came up with is this
not(equal($stage_complete_c, "false"))
Now my Status text box will appear on both DetailView and EditView when the $stage_complete_c value = true.
Basically it’s doing the same thing and I don’t know why this one work and the other doesn’t