Get the “Priority Department” of login user.
When this action is executed, the information of the primary department to which the logged-in user belongs will be saved as the result of the action.
If you refer to the results using expressions from other actions, the structure of the department information will be the list of “Organization type” described in Cybozu’s documentation .
For example, to get the department name of the priority department, write as follows:
= $1.name
To set the acquired department in the field mapping, write as follows:
= $1.code
In the case of “Set Field Value,” as an exception, it is possible to simply set it to “= $1” in the department selection field.
If the user does not belong to any department, there is no primary department, so the result of the action will be empty. The same applies to guest users, and the result of the action will be empty.
Set Target Field (Optional).
Use this parameter to set the results to another field. You can omit this parameter if you do not set the results directly in the field but use it in another action.
This parameter accepts the following field types:
This parameter does not accept fields that are inside tables.
When the destination is set to a department selection field, the currently selected other departments will be cleared, and only the primary department will be selected. If the logged-in user does not belong to any department, nothing will be selected.
When the set destination is a Text field, the department name will be set.
You cannot specify the “Target Field (Optional)” on the krewSheet. An error occurs at runtime.
If you omit the “Target Field (Optional)”, you can also use it on the krewSheet.