Node - Get Multiple Data from User/Department/O-Roles
Function: Multiple pieces of data about a user, department, or organizational role can be obtained from a field in a record or from the organization backend. The data is structurally equivalent to multiple rows of records, which can be passed to a subflow node, or other nodes for bulk data processing.
As shown above, in a worksheet, member or department is an attribute field, but also a data object, and they themselves contain a lot of information, which comes from the organization management backend. As shown below.
Information for a member in the organization:
Name, Mobile, Email, Department, Position, Job Number, Workplace, Supervisor, Subordinate, etc.
Information for a department in the organization:
Department name, Department head, Parent department, Subordinate department.
Information for a role in the organization:
Role name, Notes, Members in the role (members array), O-Role ID, Current Role, Creation Time, etc.
You can think of Members and Departments in your organization as two system worksheets, or as hidden worksheets that it must pass through this node if you want to get information about them.
Example
Create an Employee worksheet to manage members of an organization, a department, or a project team. You need to maintain and update the data of this worksheet on a regular basis to keep it in sync with the data in the organization's backend.
1. Create a timed-triggered workflow and set it to synchronize member information at 2 a.m. each workday
2. Add the [Get Multiple Data from User/Department/O-Roles] node and select [Find from all organization members]
3. Set the filter
If not configure filtering, you will get information about all members of the organization.
4. After getting the members' information, update or add them to the worksheet through the subflow
Why choose subflow: Because when some member information does not exist in the worksheet, it needs to be added; when the member information already exists, it needs to be updated. Therefore, it needs to check each record in the subflow whether the information already exists or not, and execute the corresponding action.
Subflow Configuration
5. Select the [Get Single Data] node to check if the member already exists in the Employee worksheet
6. Add a [Branch] node to perform different actions based on the results of the previous node
Update
Add
[Get reporting relationship]
Check it if you need information about the member's supervisor, subordinate, etc. If you don't need it, it is recommended to uncheck for better query efficiency.
Have questions about this article? Send us feedback