Complex Service Dialog - dynamic elements visibility



Hello everyone,

I’m trying to figure out the way to build a Service Dialog (or other solution) which has some dynamic elements visible/hidden depending on pre-loaded value and radio-buttons selected by user.

In my problem there are:

  • Variable (V): loaded from method which can receive two different values (true, false)
  • Single selection radio button (RB): with two values available (rb1, rb2)
  • Dynamic dropdown lists (DD1, DD2, DD3)

Service dialog behavior:

  1. List DD1 visible WHEN V=false
  2. Lists DD1, DD2 visible WHEN V=true AND RB=rb1
  3. Lists DD1, DD2, DD3 visible WHEN V=true AND RB=rb2

Is there any way to solve problem described above ?




Hi here example dynamic method:

if $evm.root['dialog_new_service'] == 'true'
  $evm.object['default_value'] = username
  $evm.object['values']        = username
  $evm.object['value']         = username
  $evm.object['visible']       = true
  $evm.object['visible'] = false
  $evm.object['default_value'] = username
  $evm.object['values']        = username
  $evm.object['value']         = username

$evm.object['display']   = :edit
$evm.object['required']  = false
$evm.object['data_type'] = :string 

This method is used for “service_name” attribute and it checks the “new_service” checkbox. If this checkbox is set the service_name ‘visible’ attribute is “true”. In other way it is “false”.


Have you considered building some sort of ‘advanced’ and ‘simple’ version of the dialog?

We used to have pretty big dialogs, with several elements which used conditional visibility, as described above.
This worked pretty good from an admin perspective, but our big dialogs took 30 to 45 seconds just to load, which was unbearable from a user experience point of view.

We are currently working on improving our UI performance and the best and easiest way to do it, was to remove dynamic elements where possible, since running Automate is a relatively expensive operation. With the improvements in newest release and some optimization in our code, we are now down to about 7-9s.
In our case the invisible fields would default to some more or less static value, therefore we just added an extra step in the StateMachine, which added the missing information in the ‘simple’-Dialog


You can also consider using Automate Expression Methods described by @mkanoor to speed up / simplify dynamic dialogs.