How to show/hide/disable/enable controls dynamically after a user changes some values

This is a variation of the previous item. Sometimes it may be necessary to dynamically show/hide controls on a form after a user has changed values in other controls. For example, let’s say we have a form of the object “MyObject” showing 2 attributes – “Value1” and “Value2””. Value1 is of the Yes/No type and is shown as a checkbox. We want to dynamically show or hide the value of the attribute Value2 depending on whether the checkbox is ticked. To do this we need to define a business rule:

IF MyObject.Value1 = 'No' THEN READ PROTECT MyObject.Value2 FROM ALL 

This is not different from any other business rule. The trick here is when defining the rule to go to the “Advanced” tab and tick the “Use rule in dynamic recalculation on forms” checkbox. If this is ticked Aware IM will automatically fire the rule when any field that the rule depends on loses focus, and show/hide the appropriate controls.

  • Last modified: 2023/05/09 02:01