AnsweredAssumed Answered

Custom Dependency on Decimal Field

Question asked by Parithiban G on Jul 22, 2020
Latest reply on Jul 23, 2020 by André Lopes



I have a `total_cost` that is a currency field. I need to create a custom dependency on other field based on this `total_cost` field. 


Consider there is a field `limit` that should be required/visible if the `total_cost` field is greater than 5000. 


     'name' => 'SetRequired',
     'params' => array(
         'target' => 'limit',
         'value' => 'greaterThan($total_cost, 5000)',


I have created a custom dependency as above. Suppose if the `total_cost` field is null then this is not working out. How can I create a custom dependency for the currency field if it is null?


I have tried

'not(equal($total_cost, "NULL"))'

'not(equal($total_cost, NULL))'