Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The condition script allows enables you to decide define whether an action will should be available for the user, or if it will should be visible but disabled, or if it will simply should be hidden from the user entirely.

By default, when adding you add a new action, it will have the following default condition script.

Code Block
number ENABLED = 1;
number DISABLED = 2;
number HIDDEN = 3;

return ENABLED;

The script should return returns one of the predefined variables: ENABLED, DISABLE or HIDDEN.

  • Enabled actions are available for the user to execute.
  • Disabled means that actions show the button for the action will be visible, but it will be disabled, preventing the user from executing the action.
  • Hidden actions will not be visible at all and thus not available hide a button on the UI and thus such action will also be unavailable for the user to execute.

Of course, since because we are using SIL, the return value of the script can be conditional.

Code Block
number ENABLED = 1;
number DISABLED = 2;
number HIDDEN = 3;

if(<some_condition>){
	return ENABLED;
}
if(<some_other_condition>){
	return DISABLED;
}
return HIDDEN;

See also