# Customizing an Entity

> Data Service contains **System built-in fields**. When you create a new entity a set of default fields is automatically created still you can customize the entities you defined by adding specific fields.

## Introduction

Data Service contains **System built-in fields**. When you create a new entity a set of default fields is automatically created still you can customize the entities you defined by adding specific fields.

![docs image](https://dev-assets.cms.uipath.com/assets/images/data-service/data-service-docs-image-47204-fcae2be5-af9f9f48.webp)

## Field Types

You can create the fields of the following field types.

* [Text](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/text#text): this field can be used to store a small amount of text.
* [Number](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/number#number): this field can be used to store a number value. Number values can be positive or negative. You must specify the number of decimal places that you want to use.
* [Yes/No](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/yesno#yes%2Fno): this field is used to choose between a **Yes**or **No** value.
* [Date-Time](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/date-time#date-time): this field is used to store a value that contains a date and time. A date picker can be used to select a date and time.
* [Relationship](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/relationship#relationship): this field is used to create a relation between two entities.
* [Choice Set](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/choice-set#choice-set): this field is used to store a list of enumerated values from which one or more values can be selected.
* [File](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/file#file): this field is used to store a file.
* [Auto-number](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/auto-number#auto-number): this field is used to automatically increase record indexes.
:::note
Each type of field requires different details that must be specified. Please check the specific page under [Entity Field Types](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/entity-field-types#entity-field-types) to find out more.
:::

## Creating Fields

To add fields to your entity data:

1. In the **Entities** list, select the entity for which you want to add a field. The **Fields** tab is displayed with the list of fields defined for the entity.
2. Click on **Create New Field**. The **Create Field** wizard opens.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/data-service/data-service-docs-image-298543-95b1f7e7-6de026b1.webp)
3. Enter a **Display Name** for the new field. The **Display Name** is the name displayed when you import the entity in Studio. This field can be modified after the entity is created.
4. Enter a **Name** for the new field. The **Name** is can be alpha-numeric, but it must start with a letter. It must have between 3 and 30 characters.
   :::note
   The **Name** field is automatically populated with the same value provided for the **Display Name**. You can only change its value during the entity creation process. Once the entity is created, the **Name** field cannot be edited.
   :::
5. Select the field **Type** using the dropdown list.
6. To enforce users to provide a value for the field, select the **Required** checkbox.
7. To enforce unique values for the field records, select the **Unique values only** checkbox.
   :::important
   The option is available for **Text** and **Number** field types.

   When needed, use the maximum decimal places configured for numbers. Otherwise, Data Service rounds up the number to the maximum value of decimals, causing uniqueness failure. For example, if you set a precision of three decimals and input values such as `3.015` and `3.0148`, the latter value is rounded up to `3.015`, leading to uniqueness failures.

   The option is case insensitive, meaning "Unique Value" and "unique VALUE" are identified as duplicates.
   :::

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/data-service/data-service-docs-image-299096-d822e205-ed753701.webp)
8. Click **More details** to configure optional field record properties, such as:

   | Option | Description |
   | --- | --- |
   | **Maximum Length** | For **Text** fields, set the maximum number of characters a user can provide. By default, up to 200 characters are allowed. |
   | **Maximum Value** | For **Number** fields, set the maximum value a user can provide. Default maximum value is `1,000,000,000,000`. |
   | **Minimum Value** | For **Number** fields, set the minimum value a user can provide. Default maximum value is `-1,000,000,000,000`. |
   | **Decimal Places** | For **Number** fields, set how many decimal digits a user can provide. Default value is `2`, which allows numbers with two decimal digits, such as `23,45`. |
   | **Default Value** | Set a default value in case users do not provide data. |
   | **Description** | Add a description for the field. |
   | **Role based field access** | Select this option to restrict [data access](https://docs.uipath.com/data-service/automation-cloud/latest/user-guide/managing-access) by granting explicit permissions. |
9. Optionally, to keep the **Create Field** wizard open, select the **Create another** checkbox. This helps you create multiple fields in the selected entity faster, as it skips step 2 of this procedure.
10. Click **Save**.

The new field is displayed in the **Fields** list.

## Updating the Fields

To update the fields you created, follow the steps below:
:::note
* You cannot update system built-in fields.
* You cannot change the **Name** and the **Type** of customized fields.
:::

1. In the **Fields** tab, hover over the field that you want to edit.
2. Click on the **Edit field** icon corresponding to the item. This is available on the right-hand side.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/data-service/data-service-docs-image-299115-73b533e2-23148cc8.webp)
3. The **Edit Field** panel is displayed. Apply your updates.
   :::note
   If the field was created with the **Unique values only** option on, you can turn it off, allowing duplicates once again. Be aware that clearing the **Unique values only** checkbox refrains you from selecting it again later.
   :::
4. Click **Save**.

## Deleting Fields

To delete fields that you have created follow the below steps:
:::note
You cannot delete system built-in fields.
:::

1. In the **Fields** tab, hover over the field that you want to delete.
2. Click the **More options** menu at the end of the field row, then select **Delete**.
3. To activate the **Delete** button, enter the display name of the field in the **Delete Field** dialog.
4. Click **Delete** to confirm the action.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/data-service/data-service-docs-image-47232-8cb384df-d846bacc.webp)

## Enabling or Disabling Role Based Field Access

**Role based field access** can be used to restrict data access. It is possible to enable **Role based field access** for custom fields only, it is not available for system built-in fields.

After the **Role based field access** option is enabled for a field, the roles need to be updated to grant explicit permissions for users to access the field. See [Manage access](https://docs.uipath.com/data-service/automation-suite/2023.10/user-guide/managing-access#managing-access) for more information.
:::note
**Standard Roles** will no longer have access to data in fields that are enabled for Role based field access. Users who need access to this data will need to be assigned a Custom role that grants permissions to access the data in the field.
:::

1. In the **Fields** tab, hover over the field for which you want to enable (or disable) Role based field access.
2. Click the **More options** menu at the end of the field row, then select the **Enable role based field access** (or the **Disable role based field access**) option from the menu.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/data-service/data-service-docs-image-47200-cd8f5e07-b4ae7127.webp)
3. Click on **Enable** (or **Disable**) to confirm the action.

   A confirmation message is displayed. See illustration below.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/data-service/data-service-docs-image-47136-eee30330-9e010ad3.webp)

   :::important
   When you enable **Role based field access** for a field, all users that have existing roles assigned that do not provide field level permissions will no longer have access to the data in the field.
   :::
4. Click on **Manage Roles** to open the **Roles** tab of the **User Management** page. Here you can update the Custom Roles to grant permissions for the field access.
