Skip to end of banner
Go to start of banner

Conditions

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 2 Next »

We've encountered an issue exporting this macro. Please try exporting this page again later.

Condition scripts allow uses cases that have complex requirements around data validation or permissions to come to life. Condition scripts are very simple, if the script returns TRUE at then end, the user will be able to see the transition button. If the script returns FALSE, the button will not be visible.

Example 1 - Is user in group

if(userInGroup("administrators", currentUser()) == false) {
    return false;
}

There is no need to create an ‘else’ statement in this script because condition scripts are assumed to be true unless a false is specifically returned by the script.

Example 2 - Is user in role

return isUserInRole(currentUser(), project, "developers");

For routines that return true or false there is no need to wrap them in an IF statement.

  • No labels