To define an action, right-click in the Actions column, then select
Add Action from the context menu. An
Action window appears, in which you define the action. For initialization of a new issue record, the only appropriate action type is
setValue. (
Note: Some releases of AccuWork allow you to include setRequired and setChoices actions in a record initialization. Such actions will be ignored when a new record is initialized.)
After setting the action type to setValue, select a field to be initialized and specify the initial value. The
Value edit-widget adjusts to the selected field. In the example below, the
data type of the
state field is
choose, so the list-box offers the field's predefined choices as the initial value.
The setting of initial field values is an unconditional validation: it happens every time a New Issue command is invoked. All other validations are conditional: a certain set of actions are performed if, and only if, a certain condition is met.
To create a new conditional validation -- that is, a new row in the table -- right-click anywhere in the Conditions column, then select Add Condition from the context menu. Then proceed to construct the "if" clause. The same context menu provides the
Edit Condition command (for revising an existing "if" clause), and the
Remove Condition command (for removing a conditional validation).
To define a setValue action for a validation condition:
2.
|
The Value edit-widget adjusts to the selected field, just as it does when you're initializing a field in a new issue record.
|
In a validation, a setChoices action can change the "choice list" that the user will see when he opens the list-box: The changes to the choice list can include:
You cannot add new strings to the choice list with a setChoices action. The changes made by a
setChoices action are temporary: they last only until the next
setChoices action on the same field, or until the user closes the Issue form. When an Issue form is opened on another issue record (or subsequently on this issue record), the user will see the field's original choice list, as defined on the
Schema tab.
To define a setChoices action for a validation condition:
1.
|
In the Action window, select setChoices as the action type, and use the Field list-box to select one of the database's fields of type "choose".
|
To define a setRequired action for a validation condition:
If you want a field to be required in all circumstances, use the setRequired action along with a condition that's always true. For example, you can exploit the fact that every issue record has a positive integer as its issue number:
The setIssuePermission,
setTabPermission, and
setFieldPermission actions are essentially similar: they restrict the editability of some component of the issue record:
•
|
ro— Make read-only for all situations.
|
•
|
auto— (AccuRev Workflow only.) Make read-only for end-users, but allow AccuRev to make changes.
|
The "read-only" ( ro ) permission affects the user's current access to the issue record; the "read-only" status is not stored in the repository as part of any issue record. For example, user
allison might find that she cannot change any fields on the Assignment page of any issue record, because of this validation:
This restriction affect allison 's access to issue records; other users' access remains unaffected. And if this conditional validation is subsequently removed,
allison will regain access to the Assignment page of all the issue records.
The “automatic” ( auto ) permission is similar to
ro, but in AccuRev Workflow, AccuRev can perform actions that end-users are prevented from making as described above. For more information about AccuRev Workflow-specific details, see the
AccuRev Web Interface User’s Guide.
The setChangesRequired action specifies that the user cannot
Save an issue record unless there is at least one entry in the issue record's change package.
The setParentRelationshipRequired action specifies that the user cannot
Save an issue record unless there is at least one entry in the lower table of a particular
relationship field.
The setChildRelationshipRequired action specifies that the user cannot
Save an issue record unless there is at least one entry in the upper table of a particular
relationship field.
You cannot set both these requirements for the same relationship field, because each field can have parent relationships or child relationships, but not both.
Tip: You might want to use the "initialization of cloned issue" actions to reset field values for an issue record when it is cloned. For example, rather than using the original issue record’s dateSubmitted value for the cloned issue (AccuWork uses all of the original issue’s values by default), you might want to use a setValue action to change dateSubmitted to "CUR_DATE". See
Cloning an Issue for more information on this topic.