> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# USERFIELD

> The USERFIELD function retrieves information about the employee selected in a specified member component within YiDA forms and workflow design. It supports retrieving the user name, userId, and Employee ID.

This topic describes the syntax, parameters, and usage of the **USERFIELD** function.

## Supported Product Scenarios

The USERFIELD function is supported in the following YiDA scenarios:

* Form (main form fields)
* Form (business association rules)
* Form (validation)
* Workflow design (validation rules)
* Workflow design (association actions)

## Syntax

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
USERFIELD(member component, field)
```

## Attribute Description

| **Attribute**    | **Required** | **Description**                                                                                                                                                                                                                                                                                                                                |
| ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| member component | Yes          | The member component field from which information is retrieved.<br />Multiselect mode is not supported. Otherwise, only the first selected user's information can be retrieved.                                                                                                                                                                |
| field            | Yes          | The type of user information to retrieve. Valid values:<br />• **name**: the user name.<br />• **userId**: the userId of the employee. This ID uniquely identifies the employee within the current organization and is generated automatically by the system.<br />• **businessWorkNo**: the Employee ID, which can be specified by the admin. |

## Return Value

| **Return type** | **Description**                |
| --------------- | ------------------------------ |
| Text            | The returned user information. |

## Example

As shown in the figure below, use the `USERFIELD()` function to retrieve the user name, Employee ID, and userId of the currently signed-in user.
