Use a Department field to record one or more departments from your Yeeflow organization. For example, an equipment request can use a Department field to record which team will use the equipment. Departments must already exist in the organization directory. Manage departments.
How to add a Department field
Open the approval form designer. Find Department in the Add Controls panel and drag it into a section or container. Select the control to open its settings. To store the selection in a data list, add a Department field to the list and place that field on its list form. Understand form controls and their associated variables or fields.
Basic of the Department field
In Content → Basic, set the title, for example Requesting department. An approval form control is created with an associated variable. Use Edit to change the variable ID or name. Use Reset to bind the control to an existing compatible variable.
Set Parent Node to limit the departments available in the picker. Leave it empty to use the organization directory as the starting point. Choose from two ways to set a parent.
Static. Select a fixed parent department. Choose Operations to offer departments under Operations.
Variable. Use the Expression Editor to reference another Department field on the same form. For example, let the person filling out the form select an operating division first, then choose a department within it. Preview the form with different divisions to check the available departments.
Appearance of the Department field
In Content → Appearance, set a placeholder such as Choose your department. Enable Multiple if the field can accept several departments. Set Max selection to limit the number when needed.
Turn on Hierarchy to let users browse the department tree from the organization or selected parent. Hierarchy is off by default. When it is off, the picker offers the direct departments at the chosen level.
Enable both Multiple and Hierarchy to reveal Hierarchical Selection Mode. Choose how the field handles a parent and its child departments.
Default uses the same behavior as Linked selection.
Linked selection reports only the parent when someone selects the parent or all its children. For example, with Warehouse and Logistics as the two children of Operations, selecting both children reports Operations.
Independent selection treats each department separately. Selecting Operations alone reports Operations. Selecting Operations, Warehouse, and Logistics reports all three.
Department fields in data lists also support these selection modes. Preview the picker with a parent and two children, then check the stored selection in a test record or the next form that reads the value.
Use Display Title and Allow comment to control whether the field shows its title and accepts comments. Apply dynamic display rules when the field's visibility or behavior depends on other values on the form. Dynamic display rules
Validation of the Department field
In Content → Validation, turn on Readonly to let users view the selected departments in that form. Turn on Required if a department must be selected before submission.
Choose a default value if the form needs one.
Customize preselects the department you choose in the picker.
Current user's Department uses the signed-in user's department. Preview the form as a test user with a department assigned and check that it is available under the configured parent.
Use custom validation for additional restrictions and write a message that explains how to fix an invalid selection. Test clearing the field and selecting both valid and invalid values. Custom validation
Action call of the Department field
Create a form action, then select it in Content → Action for the Department control. The control calls the action when the department value changes. Change the value in preview and check that any dependent fields or messages update as expected. Form actions.
Style the Department field control
Configure the editable and read-only field styles separately. Use long department names in a test form to check how the picker, selected items, and error messages fit on smaller screens.
Field - Editable
In Style → Field - Editable, adjust the picker typography, placeholder color, button colors, text alignment, and padding. Style the normal and focused states separately using text and background colors, borders, corner radius, and shadows.
Set the field width in px, %, em, rem, or vw, or use a calc() expression. When the field is narrower than its container, use Field Alignment to position it in that container.
Under Selected items, style the selected department labels and their spacing. Under Error Message, set the typography and color used for validation feedback.
Field - Read Only
In Style → Field - Read Only, use Selected items to style the department labels in the read-only version of the field. Adjust typography, colors, borders, radius, shadows, margins, and padding. If the field shows several departments, check how the labels wrap in a narrow layout.
Style of title
Set the title typography and layout to match the surrounding form fields. Preview the field alongside a comparable picker to check alignment and spacing. Field control titles.
Advanced Settings
Open Advanced to configure layout options such as spacing around the control. Preview the picker and validation messages at desktop and phone widths before publishing the form. Advanced options.

