Customize

Get Users Belonging to an Organization

Summary

Get the users who belong to the organization selected in the Department selection field.

How to use

When this action is executed, a list of users belonging to the department selected in the department selection field will be saved as the result of the action.

When multiple departments are selected in the department selection field, all affiliated users of those departments will be retrieved collectively. If the same user belongs to multiple departments, duplicates will be removed, so that user will appear only once in the resulting list.

The structure of the result data will be a list of “User type” described in the Cybozu documentation .

For example, to get the display name of the first user, write as follows:

= $1[0].name

To set the acquired department in the field of “Set Field Value” or in the user selection field in the field mapping, write as follows:

= $1

Parameters

Set Organization Selection Field and Target Field (Optional).

Organization Selection Field

Specify the field in which a department has been selected.

The only selectable field type is the department selection field.

When selecting fields in the table, retrieval will be performed for each row. However, in this case, if you try to reference the result of the action with an expression like $1, it becomes uncertain which line’s result will be returned. To perform processing on each row in the table, specify Target Field (Optional).

If no department is selected in this field, it will not result in an error, and the result will be an empty array.

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
  • Text area
  • Rich text
  • User selection

When specifying fields within a table, the “Department selection field” must also select a field from the same table.

If the set destination is a user selection field, the currently selected other users will be cleared, and the members of the acquired department will be set in the user selection field.

When the set destination is a Text field, the user’s display names will be set in a comma-separated format.

Compatibility with krewSheet

This action is designed to work seamlessly with krewSheet.

If the Target Field (Optional) is specified without omission, it is only supported under the following conditions:

However, there are the following restrictions:

  • It does not set values in the fields that serve as Lookup destinations.
  • The following field types can be set when a record is saved (e.g. when you select the Condition “Before Record Saved Excluding Deleted"): If you want to gain more technical knowledge, refer to the krewSheet documentation .
    • Fields not included in the krewSheet view’s columns
    • Fields set to read-only in krewSheet
    • Rich text field

If you omit the “Target Field (Optional)”, it will support regardless of the conditions.

Differences compared to the old version:

The behavior when the number of users belonging to the department exceeds 100 varies by version.

If you use Customine version 1.211 (released on June 13, 2024) or earlier to “register to Kintone app,” up to 100 users can be retrieved.

In version 1.212, released on July 18, 2024 or later, retrieving more than 100 users is possible.

Restrictions

  • The user’s position cannot be obtained with this action.

  • When setting Target Field, it can be used on any of the following screens. If used on other screens, it will result in an error during app execution. When the “Target Field” is omitted, it can be used on other screens, such as the record detail screen.

    • New record screen
      • Available for use at any time
    • Edit record screen
      • Available for use at any time
    • Inline editing mode on PC (after pressing the pencil icon to enter editing mode)
      • Available only just before saving the record.