Get the organization to which the currently logged-in user belongs.
When this action is executed, the information of the department to which the logged in user belongs will be saved as the result of the action. If the user belongs to multiple departments, all of them will be retrieved.
It is possible to reference this information from $1 using an expression, but a more typical usage is to combine it with “If user belongs to the specified group or organization.”
To refer to the result using an expression from other actions, refer to the “Response” section in Cybozu’s documentation for the result data structure.
For example, to get the department name of the first affiliated department, write as follows:
= $1.organizationTitles[0].organization.name
To set the acquired departments in the field of “Set Field Value” or in the department selection field in the field mapping, write as follows:
= $1
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 the department to which the logged-in user belongs will be selected. If the logged-in user belongs to multiple departments, all will be set.
When the set destination is a Text field, the department name is set. If the logged-in user belongs to multiple departments, the department names will be set as a comma-separated list.
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.
In a parent-child relationship within the department, when the child department does not belong to the parent department, only the child department will be acquired.
Cannot be obtained if the user is a guest user.