I have a problem with window calculation. The logic is that when you click the checkbox, the "Сервис" and "Причина" fields should hide and become optional. The same should happen with a checkbox if the "Сервис" or "Причина" field is not empty
This is a calculation, the result of this is displayed at the bottom of the window. "Сервис" is a _Category1, "Причина" is a _ByReason and checkbox is a CauseNotFound
Text of calculation:
static def GetAttributeValue(Resolution):
Value = ":SetHidden(_Category1, True);:SetHidden(_ByReason, True);:SetMandatory(_Category1, False);:SetMandatory(_ByReason, False);"
if Resolution._Category1 is not null or Resolution._ByReason is not null:
Value = ":SetHidden(_CauseNotFound, True);"
Value = ":SetHidden(_Category1, False);:SetHidden(_ByReason, False);:SetHidden(_CauseNotFound, False);"
The problem is that if the "Сервис" field is first filled in and then cleared, then, if you mark checkbox, an error appears that the "Сервис" field should be filled, although the result of the calculation indicates the opposite.
If you do one thing, that is, immediately mark checkbox or fill in the "Сервис" and "Причина" fields, then there are no problems.
I have already tried many things, I do not know the reason.