I have a data model containing a number field with an amount. Depending on whether that field is filled there is another field în its own group that is computed based on the value of the amount.
I would like to display the computed field in its own section in the ui designer, but only show this section if the field with the amount has been filled.
How can I show/hide this section depending on whether the field with the amount is filled?
The UI designer doesn’t allow me to specify a dependent controls or dependent groups/fields.
The data model for example is this:
<?xml version="1.0" encoding="UTF-8"?>
<model xmlns="http://www.mgm-tp.com/a12/picus/model/v2">
<metadata>
<name>DomainFoo</name>
<languages>en</languages>
<annotation name="roles">admin</annotation>
<comment/>
<savedAt>2019-11-01T09:17:28.662+01:00</savedAt>
<schemaVersion>22.6.0</schemaVersion>
</metadata>
<group max="1" id="group_a40fa" name="Base">
<field id="field_0bb2a" name="Value">
<number trait="amount"/>
</field>
</group>
<group max="1" id="group_93b02" name="Derived">
<field id="field_94dcf" name="ValueGross">
<number trait="amount"/>
</field>
<computation id="computation_56993" name="ValueGrossComputation">
<fieldIdRef>field_94dcf</fieldIdRef>
<errorCode/>
<errorCondition>FieldFilled(ValueGross) and ( ( FieldFilled(/Base/Value) and [ValueGross] != [/Base/Value] * 1.19 ) )</errorCondition>
<errorMessage>
<text lang="en">error text for computation of ValueGrossComputation</text>
</errorMessage>
<severity>error</severity>
</computation>
</group>
</model>