Skip to main content

Obtain the specified Member Department

In the process of building YIDA applications, you may encounter the following problems.

  • In the performance appraisal system, obtaining the department information of the appraisal staff helps to set reasonable performance indicators, make inter-department comparisons, and design incentive plans.
  • In the CRM system, after obtaining the department information of the customer owner, it is convenient to assign appropriate system access permissions and data permissions to them to ensure information security and work efficiency, at the same time, it is also convenient for subsequent data analysis between departments.

Prerequisites

This tutorial uses the form formula of YIDA. You can first understand the followingForm formula.

Effect

Implementation steps

Create a common form page

Create a common form page. For more information, seeCommon form.

Drag the following components into the canvas area.

  • Member: Named as a member
  • Single line text: Named as department text
  • Department: Named as a single department
  • Department: named all departments
    • Enable multiple selection mode]

Add Form formula

By default, only the first selected Member department is obtained when multiple selection mode is enabled.

Select quick configuration for the member component. By default, the current logon person is selected.

Select a formula to edit the department text and configure the formula shown in the following figure. You can also directly copy the formula source code and pay attention to modifying the fields.

{"text":"DEPTNAME(GetArrayItem(​成员​,1))","marks":[{"from":{"line":0,"ch":22,"sticky":null},"to":{"line":0,"ch":26,"sticky":null},"value":"employeeField_lu9ieou3","invalid":false}],"isCmData":true}

For a single department, select formula editing and configure the formula shown in the following figure. You can also copy the formula source code directly, and pay attention to modifying the fields.

{"text":"DeptBuilder(GetArrayItem(​成员​,1))","marks":[{"from":{"line":0,"ch":25,"sticky":null},"to":{"line":0,"ch":29,"sticky":null},"value":"employeeField_lu9ieou3","invalid":false}],"isCmData":true}

All departments select formula editing and configure the formula shown in the following figure. You can also directly copy the formula source code and pay attention to modifying the fields.

{"text":"DeptBuilder(GetArrayItem(​成员​,1))","marks":[{"from":{"line":0,"ch":25,"sticky":null},"to":{"line":0,"ch":29,"sticky":null},"value":"employeeField_lu9ieou3","invalid":false}],"isCmData":true}

Save page

Video tutorial

Try it online

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4