how to write conditional mandatory in text box validation expression

1
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!  
asked
1 answers
1

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.

Kind Regards,

Josh

answered