﻿# App data type

> [HTML Version](app-data-type.html)

**App** is a [field type](360009707032.md) used to specify one or more items of a specific [app](360006963072.md). For example, to display links to deals concluded with the client in their page.

**(app-data-type-1.png)**

You can use this field to allow an employee to:



- Only view the value and go to the page for the related app item.

- Select an existing app item in the field.

- Add a new record.



When you create an **App**‑type field, you need to:



1. [Configure the field settings](#app-field-settings). Fill in the basic options which are always available. If you are adding the field to an app form, also define additional settings.

2. Specify whether the field can be filled in. The available options vary depending on where the field is placed:



- [On an app form](#in-apps).

- [On a form in a business process](#in-process), such as a task page.

- [In the interface designer](#in-interface-designer) when customizing a page, widget, or form template.

````
начало внимание

````
Only users in the [Administrators](360006871932.md#administrator) group can add and configure fields.

````
конец внимание

````


## App-type field settings



When you add an **App**‑type field to an [app](360028941112.md), [business process](process_context.md), or [widget context](context_types.md), you see the window with its settings:



1. Complete the basic settings which are always available:



- **One** or **Many**. Determine how many app items the user can specify in the field.  
  
Please note, if the field is placed on a form of an app that already contains items, you cannot change the subtype from **Many** to **One**.



````
начало примечание

````
**Note**  
****  
When configuring the [display of items on an app page](360009923311.md), a field with the subtype **Many** can be added to a table, tiles, or a kanban board. In this case, when the app is opened, data is loaded for all links from this field for each displayed item page. This increases the system load, especially if there are many such links. To optimize the display of app pages, you can [enable eager data loading](360009923311.md#eager-load).

````
конец примечание

````


- **App\***. Specify the app whose items will be specified in the field. Please note that after saving the option, it cannot be changed.

- **Add filter**. Enables setting up filters for records when selecting existing items from a linked app. For instance, you can choose to display only items created by the current user. To learn more, see [Add a filter for users and app items on the item form](limit-selection-of-elements.md).

2. If the field is added to the app context, additional options are also available:  
**(app-data-type-2.png)**

- **Field for linking**. Link fields in two apps so that links to related items are automatically synchronized. If the app you specified has a field with a link to the current app, this option will be enabled automatically. To learn more, see [Configure a field to link items of two apps](field-for-linking.md).

- **Default values for new items**. Used to speed up creation of linked items with automatic filling of the fields. You can configure copying of data from the item of the current app or set the values manually. To learn more, see [Default values for new items](360022129191.md).

- **Bound app**. Controls saving of the linked item. Used when a linked item should only be added together with its parent one. When this option is enabled, the child item is not created in the system until the parent item is saved. To learn more, see [Bound apps](360020016471.md).

After this, determine whether the field can be filled in.



## Place a field on app forms



When you add an **App**-type field during app creation:



- If working in the standard form setup mode, you cannot change the ability to edit a field; the [default settings](#standard-mode) are used.  
  
When creating and editing the field, the user can always select or add a record to the field, and from the view form, they can create a new app item.

- After switching to the Advanced mode of form settings, you can configure how the user works with the [create and edit forms](#create-edit-forms), as well as [app view form](#view-form).

You can allow or prohibit selection from existing app items and the creation of new ones, make the value viewable only, or display data from the related item page.



### Add data to a field in the standard mode of form settings



By default, after creating an app, you work in the [standard mode of form settings](360009918011.md). This allows you to define a single set of fields that users will see when creating, viewing, and editing app items.



You cannot change the editability settings for the **App**‑type field in this mode. An employee can always:



- When creating or editing an item:

	- Select an existing record in the field — if the user has [access permissions to view items](360007527512.md#assign).

	- Add a new record — if they have permissions to create items.

- On the item view form — go to the record page or add a new related item using the (add-item-button.png) button, if the user has sufficient permissions.

You can switch to the [Advanced mode of form settings](360028941032.md) to customize field editability separately for the create, view, and edit app forms. For more information on placing form fields in Advanced mode, see [Create, View, and Edit Tabs](360029250871.md).



### Customize field editability on create and edit forms



If you're working in Advanced mode of form settings, when placing an App-type field on the create and edit tabs, you can:



1. **Allow editing a field**.

To make a field editable:

1. Next to the field name, disable the **Read only** option.  
**(app-data-type-3.png)**

2. Click the field name, then in the window that opens, go to the **App Item** tab.

3. Configure what data the user can enter in the field:  
**(app-data-type-4.png)**

- Allow selecting from the list of existing items. By clicking the magnifying glass icon next to the field, the user will see a list of all available app items in a table format with the ability to [search by parameters](360009669952.md#searching-by-fields). If you set up a filter in the [Add filter](#add-filter) option, the user will see only records that match the specified criteria.  
  
Select **Set up columns of the list** to configure [table settings](360009923311.md#table-settings) the same as on any app page.  
  
For example, to search for a contract, add the **Name** and **Contractor** parameters and enable sorting by the **Amount** field. Then the user will see a table of contracts with contractors listed, and their order in the list will depend on the contract amount. You can also apply the settings specified when setting up the table in the app by clicking the **Default** button.  
**(app-data-type-5.png)**

- **Show a button that allows users to add new items**. The **+ Create** button will appear next to the field, allowing you to add a new record to the specified app.



4. Save the settings.

Please note that if you enabled the [Bound app](#bound-app) option when adding the field, you cannot customize the populated field. Since a child record is added to the field, the button for creating an item is always available, and selecting from existing items is disabled.



2. **Make the field read-only and display nested properties**.

Leave the **Read only** option enabled to prevent the field from being filled in. For example, if the set value can't be changed when editing an item or the field is filled automatically by a [script](client_server_scripts.md).



In this case, you can display nested properties — data from the related item — next to the field. This way, the user will see all the necessary information without having to navigate to another record's page. For example, in the **Client** field, under the organization name, you could display details filled in separate fields: **Address**, **Work Phone**, etc.



To do this:

1. Click the field name in the list.

2. In the window that opens, go to the **Properties** tab.

3. Move the app properties from the **Context** column to the **Name on Form** column.  
**(app-data-type-6.png)**

4. Save the settings.

The form will display a link to the related item and the data from its fields.



### Customize field display on the view form

If you move a field to the **View** tab in [Advanced mode of form settings](360028941032.md), you can simultaneously configure the display of nested properties and the addition of a new record. 

Click on the field name to open the settings window. You can:

1. **Show nested properties**.

On the **Properties** tab, drag and drop fields onto the form, just as [in the Create and Edit tabs](#create-edit-forms). Data from the linked app item will appear next to its name on the page.

2. **Configure adding records from the item page**.

In the **Add Item** tab, the button (add-item-button.png) is enabled by default. The user can add a linked item to the field without editing the current record.



To configure the button, select an option:



-  **<Standard creation>**. Used by default and allows you to add an item to the linked app and a link to it in the item page.

- **+ Item**. Duplicates the functionality configured for the [item creation button](360019229331.md) on the app page. If a [business process is linked](360009921131.md#start-process) to the add new item button, it will be launched.

- Start business process. Allows you to launch the process that adds the item when you click the button.



You can find the use case for configuring a button for adding an item [Create an app item on the page of another app](360029148471.md).



To disable the ability to create a record in a field, on the **Add Item** tab, disable the **Show a button that allows users to add new items** option.



## Place a field on a form in a business process

You can add a field of the **App** type to a [form in a business process](360012495991.md). For example, so that an employee can see a link to a contract being processed or specify a client on a task page.



Configuring a field is the same as [adding it to a create or edit form in an app](#create-edit-forms).



If a field on a task form is editable and an employee does not have sufficient access permissions, they will automatically be able to fill in the field. They will not have direct access to the app and will not be able to edit item fields outside of the task.



## Place a field in the interface designer



The [interface designer](interface_designer.md) is where you create form templates, pages, and custom widgets. When you configure them, you can use:



- When setting up a page or widget — fields added in the interface designer on the [Context](context_types.md#context) tab.

- When setting up a form — fields from the **Context** tab, as well as from the [context of the app](360028941112.md) or [business process](process_context.md) for which the form is being created.



When you add an **App**‑type property to an area for modeling, in the window that opens, you can:

**(app-data-type-7.png)**

- Make the field editable. Disable the **Read only** option. The user will be able to:

	- Select an existing item. The user will be able to select an item from a list of records they have permission to view. You can filter available items using the [Add filter](#add-filter) option in the field settings.

	- **+ Create** button next to the field — if the user has permissions to add app items.

- Make the field read-only. Enable the **Read only** option. A link to the item will be displayed in the field.



### Display nested properties in the interface designer



If an **App**‑type field has a subtype of **One**, its nested properties can be placed anywhere on the form, page, or widget.



To do this, in the menu on the right, click the arrow icon opposite the field name, then drag the property from the list that appears onto the area for modeling.

**(app-data-type-8.png)**

