- 28 May 2023
- 8 Minutes to read
- Print
- DarkLight
- PDF
Working with Custom Data
- Updated on 28 May 2023
- 8 Minutes to read
- Print
- DarkLight
- PDF
Custom fields allow you to add extra data to an asset. You can add custom fields to one or more assets at the same time, or use a quick Enforcement Action to add them to all assets returned by a query. You can create new custom fields of types Single Value or Multiple Values, and assign your own custom values to existing fields in the system. You can also edit existing single value or multiple values custom fields from the Add Custom Fields dialog, inline on the asset page, or from the Custom Data management table in System Settings.
Custom fields allow you to add extra data to an asset. There are two types of custom fields:
- Common Fields - Fields from the adapter. The field type and available values are determined by the selected field.
- Specific Fields - Tailormade fields that you create. When a specific field is added to an asset, it is added only to the selected assets.
Custom fields appear in the list of fields in the Query Wizard and on the Custom Data tab in the Adapter Connections tab on the Asset Profile page. Custom fields can also be displayed in an asset table and edited inline.
Adding Custom Fields to Assets
You can add custom fields to one or more assets at the same time.
To add custom fields to assets
- On the asset page, select one or more assets.
- From the Actions menu, select Add Custom Field. The Add Custom Fields dialog opens.
From the Field dropdown list, select a field. You can also define new custom fields. See Creating New Custom Fields.
In the text field to the right, enter a value for the field. The value must match the Field Type and Value Type.
Click Apply. The custom field is added to the selected assets. The custom field can be selected as a column in the asset table. For each asset, the value of the field is displayed.
Adding Custom Fields to Query or Filter Results with a Quick Enforcement Action
You can use a quick Enforcement Action to add custom fields to all assets returned by a query.
To add custom fields to assets using a quick Enforcement Action
- On the asset page, run a saved query or filter the asset list.
- From the EC Actions menu, select Add custom field. The Add Custom Field dialog opens.
- In the Enforcement Set name field, a default value is provided. You can change this to fit your needs.
- In Field name, enter a name for the custom field (see Field in Creating New Custom Fields). Then, select a Field type and Value type.
- In the Field value text box, enter a value for the field.
- To have this field removed from assets that do not match the query parameters, select Remove the custom data field from entities not found in the saved query results. A safeguard is displayed. Click Confirm if you want to continue.
- To run this Enforcement Set on a schedule, toggle on Set scheduling and configure the schedule you want. To learn more about running Enforcement Sets on a schedule, see Scheduling Enforcement Set Runs.
- Click Save and Run. The custom field is saved and the notification "Action Created Successfully" is displayed.
Creating New Custom Fields
You can create as many custom fields as you need of types Single Value or Multiple Values. These fields can be used just like any other system or adapter field.
To add a new custom field to the system
- On the asset page, select one or more assets.
- From the Actions menu, select Add Custom Field. The Add Custom Fields dialog opens.
Start typing a field name in the Field box. It is recommended to include in a custom field name characters A-Z and 0-9 only.
If a field of that name already exists, it is displayed. Continue to type the full name of the new field and at the bottom of the Field list, click + New Field Name.
Although it is recommended to include in a Custom Field Name characters A-Z and 0-9 only, special characters (i.e., characters other than A-Z and 0-9) are also supported.
The only limitation is that the system does not support giving a new custom field a name that is the same as an existing custom field name besides for different special characters. For example: If CustomField*1 is a defined custom field, it is not possible to name new custom fields CustomField$1 or CustomField#1.
If you do give similar field names, when you click Apply to save the changes, the following notification is displayed: Failed to Save Field, and the field is dropped.
In the Field Type list, do one of the following:
- To create a single-value field, select Single Value.
- To create a list field, select Multiple Values.
In the Value Type list, select one of the available types:
- When Field Type is Single Value, the following Value Types are available:
- String
- Date - See Adding a Custom Date Field.
- Float
- Integer
- Boolean
- When Field Type is Multiple Values, the following Value Types are available:
- String
- Date - See Adding a Custom Date Field.
- Float
- Integer
- When Field Type is Single Value, the following Value Types are available:
Do one of the following:
- When the Field Type is Single Value, enter a value in the empty value text box. The value is determined by the Value Type.
- When the Field Type is Multiple Values, in the Add text box, type the list of field values. Press Enter, comma, or semicolon to add another value. You can click the x of a value to remove it, or click a value to edit it.
Click Apply to add the new field to the selected assets.
Custom fields are marked with a user icon in the list of fields.
- If you have Admin permissions, you can manage all custom fields in the system. Click Manage Custom Fields. You will be taken to the Managing Custom Fields and Tags page.
Adding a Custom Date Field
You can add one or more dates in a custom field. This is useful for instance, to identify the first time an asset was noncompliant. You can add a single or multiple date field.
To add a single date or a list of dates
- On the asset page, select one or more assets.
- From the Actions menu, select Add Custom Field. The Add Custom Fields dialog opens.
Start typing in the Field box. If a field of that name already exists it will be displayed. Continue to type the full name of the new field and at the bottom of the Field list, click + New Field Name.
Do one of the following:
- To add a single date, select a Field Type of Single Value.
- To add a list of dates, select a Field Type of Multiple Values.
Select Date as the Value Type.
Click Select Date and select a date from the Date Picker and click OK. The date can be in the past, present or future.
Click select time at the bottom of the Date Picker to add a time with the date. By default, a time of 00:00 is selected.
To add a list of dates, click Add Date for each date you want to add and select the date from the Date Picker.
Click Apply to add the new field to the selected assets.
Assigning a Custom Value to a Predefined Field
You can assign your own custom values to fields that already exist in the system.
To assign a custom value to a predefined field in the system:
- From the Field dropdown box, choose a field. The Field Type and Value Type are pre-set (determined by the field itself).
- In the value text box to the right, type a value, and click Apply. For Multi-value fields, you can add a list of values with the values separated by pressing Enter, a comma or semicolon. For Single Select fields you can select a predefined value.
Editing Existing Single Value or Multiple Values Custom Fields
You can edit the value of an existing custom field of type Single Value or Multiple Values, whether common or specific.
Editing a Custom Field from the Add Custom Field Dialog
To edit a value of an existing custom field from the Add Custom Fields dialog
- On the assets page, select one or more assets.
- From the Actions menu, select Add Custom Field. The Add Custom Fields dialog opens.
- From the Field dropdown list, select a field.
- Click in the Value field, and type the new value.
- When you have finished adding or editing custom fields, click Apply.
Editing a Custom Field Inline on the Asset Page
To edit a value of an existing custom field using inline edit
- In the asset page, configure the columns to display the custom field you want to edit. See Setting Page Columns Display on how to configure the page columns.
- Hover over the value of a custom field for the asset you want and click the pencil icon.
- In the edit dialog, change the value according to the field type and click Save Changes.
Editing Existing Single Select Custom Fields
You can modify, delete, or add values of an existing custom field of type Single Select, whether common or specific, from the Custom Data management table in System Settings.
For a complete explanation, see Managing Custom Fields and Tags.
Managing Custom Fields for a Specific Asset
You can view and manage all the custom data fields configured for a specific asset.
To manage an asset's custom fields
From one of the asset pages (Devices, Users), click an asset. The Asset Profile page opens for the selected asset.
In the left navigation pane, under Adapter Connections, click Custom Data.
In the upper-right of the Asset Profile Custom Data, click Manage Custom Fields.
In the Manage Asset Custom Fields dialog, all the custom fields related to this asset are listed. You can add custom fields, delete existing custom fields, modify custom fields, or remove values from custom fields.
When you are finished making changes, click Save Changes.
A custom field (Single Value or Multiple Values) must be defined with at least one value. If you delete all values of a custom field, clicking Save Changes fails and keeps the previous configuration. You can remove all values of a custom field only by removing the entire custom field from the system.