> For the complete documentation index, see [llms.txt](https://docs.coreway.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coreway.com/yoov-plus/worksheet/worksheet-design/field-type/department.md).

# 部门

部门字段用于关联并选择您团队组织架构中的部门。

## **1. 选择模式** <a href="#id-1-select-mode" id="id-1-select-mode"></a>

* **单选**：只能选择一个部门。
* **多选**：可以选择多个部门。

## **2. 权限设置（核心功能）** <a href="#id-2-permission-setting-core-feature" id="id-2-permission-setting-core-feature"></a>

通过此设置，可**将记录的访问权限批量赋予整个部门的所有成员**，是实现基于部门协同的高效功能。

| 权限类型        | 赋予部门内成员的记录权限 | 示例说明                                            |
| ----------- | ------------ | ----------------------------------------------- |
| **成员**      | **查看**       | 若记录A的部门字段选中“销售部”，则**销售部所有成员**均可查看记录A。           |
| **拥有者**     | **查看、编辑、删除** | 若记录B的部门字段选中“生产部”，则**生产部所有成员**均可管理记录B。           |
| **仅用于存储数据** | **无任何权限**    | 若记录C的部门字段选中“研发部”，该字段仅作为数据存储，**不赋予研发部成员任何访问权限**。 |

> **重要说明**：此处的权限设置**必须与“应用权限组”配合生效**。如果部门或其成员所在的权限组未获得相应的工作表访问权限，即使在此字段被设置为“拥有者”，部门成员也可能无法操作记录。

## **3. 默认值设置** <a href="#id-3-default-value-setting" id="id-3-default-value-setting"></a>

支持为字段预设自动填入的部门。

* **当前用户所在部门**：自动填入当前操作者所属的部门。
* **动态值**：
  * **其他字段值**：引用本表或关联表中的**成员**、**部门**字段或**系统字段**（创建者、拥有者、最近修改人）。
  * **查询工作表**：通过部门条件查询其他工作表，并将匹配记录的部门信息填充至此。

## **4. 验证** <a href="#id-4-validation" id="id-4-validation"></a>

* **必填**：该字段必须选择至少一个部门。

<figure><img src="/files/5lw5HbLXYwnqWWguToFd" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coreway.com/yoov-plus/worksheet/worksheet-design/field-type/department.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
