Customize

Get Priority Department

Summary

Get the “Priority Department” of login user.

How to use

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.

Parameters

Set Target Field (Optional).

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:

  • Text
  • Department selection

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.

Compatibility with krewSheet

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.

Restrictions

  • Regarding the “Target Field”, it is only valid in the record list view when the process starts with “Before Record Saved Excluding Deleted”. Under other conditions, no value will be set to the field.