how to write conditional mandatory in text box validation expression
I wanted to set the text box validation part to be conditional mandatory, specifically speaking, I want to set the box ‘VolumnType’ to be required if ‘ChargeType’ box value equals ‘Volumn’. And the data type of ‘ChargeType’ is enumeration. I write $currentObject/CHARGETYPE = MyFirstModule.ChargeType.VOLUME and trim($value) != '' in the validation part in VolumnType but it did not work. Can anyone give me some tips how to write the expression? Thanks a lot!
Hi Yuanyi Zhang,
To achieve this, you may need to separate the validation out into a microflow that runs when you click the save button.
That way you can first check if the ChargeType is Volume, then check the VolumeType is not empty.
Here is a rough example of what that may look like.