Skip to end of banner
Go to start of banner

Condition Script

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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

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

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

return ENABLED;

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

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

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

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

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

See also

  • No labels