Axonius - Add Custom Data to Assets
  • 26 Nov 2023
  • 7 Minutes to read
  • Dark
    Light
  • PDF

Axonius - Add Custom Data to Assets

  • Dark
    Light
  • PDF

Article Summary

Axonius - Add Custom Data to Assets can be configured to do the following to each asset resulting from the query run:

  • Add a Custom Field (name and value) to the asset.
  • Add or replace a value of a Custom Field or Axonius Field that already exists on the asset.

Learn more about Custom Data.

Note:

Once added, you can use the custom data as a field in future queries.

See Creating Enforcement Sets to learn more about adding Enforcement Actions to Enforcement Sets.

General Settings

  • Enforcement Set name (required) - The name of the Enforcement Set. A default value is added by Axonius. You can change the name according to your needs.
  • Add description - Click to add a description of the Enforcement Set. It is recommended to describe what the Enforcement Set does.
  • Run action on assets matching following query (required) - Select an asset category and a query. The Enforcement Action will be run on the assets that match the query parameters.
  • Action name (required) - The name of the Main action. A default value is added by Axonius. You can change the name according to your needs.
  • Configure Dynamic Values - Toggle on to enter a Dynamic Value statement. See Creating Enforcement Action Dynamic Value Statements to learn more about Dynamic Value statement syntax.

Required Fields

You can create a new Single Value or Multiple Value custom field to add to each asset that results from the query run.
Or, you can select a predefined Custom Field or Axonius Field to add to each asset, or if the selected field already exists on the asset, to replace its value or add to its values. In the case that the predefined field is configured in the system as Single Select, you are required to choose a single value so that the field is added to the assets as a single value field.

The following fields must be configured to run the Enforcement Set.

  1. Field name - Select a predefined Custom Field or Axonius Field, or create a new Custom Field.
    • Select a predefined Custom Field or Axonius Field: From the Field name dropdown, filter the list of fields to select a Custom Field or Axonius Field that is already defined in the system to either add to each asset, or if this field already exists on the asset, to add values to it or replace its values.
      The Field type and Value type are automatically filled in according to the custom field configuration. Proceed to step 3 below.
    • Create a new custom field to add to the asset: Type a new field name and then click + New Field Name to add a new custom field to the asset.
Note:

Custom field names support special characters (i.e., not alphabetic or numeric characters). However, the system does not support giving a custom field a name identical to that of an already existing custom field apart from special characters. For example: If CustomField*1 is a defined custom field, you should not name a new custom field CustomField$1 or CustomField#1.

  1. For new custom fields only:
    1. From the Field type dropdown, select one of the following:
      • Single Value - Creates a single-value field.
      • Multiple Values - Creates a list field.
    2. From the Value type dropdown, select a value type according to the field type that you selected.
      • When Field type is Single Value, the following Value types are available:
      • When Field type is Multiple Values, the following Value types are available:
  2. For a predefined field (Custom Field or Axonius Field): When the Field type is Single Select, from the Field value dropdown, select a single value.
  3. When the Field type is Single Value, in the Field value box, type a value. The field value is determined by the Value type.
    • For a String, Float, or Integer value type, in the Field value field, select from the dropdown or type a free-text value for the custom field.
    • For a Boolean value type, from the Field value dropdown, select either True or False.
    • For a Date value type, select the current date or a specific date. See Adding Dates below for more details.
  4. When the Field type is Multiple Values:
    • In the Field Value box, type a list of field values. You can click the x of a value to remove it, or click a value to edit it.
      • For a String, Float, or Integer value type, in the Field value field, select from the dropdown (if it exists), the field values. Otherwise, type a value, and then press Enter, comma, or semicolon to add each additional value to the list. You can also paste a comma separated list into the field. To learn more, see Adding a List String below.
      • For a Date value type, select the current date or specific dates. See Adding Dates below for more details.
    • When you enable the Check to append values to existing. Leave off to override existing values. option, if the Multiple Value field already exists on the asset, the field values entered in this enforcement action are added to the existing values on the asset field. Otherwise, the entered field values overwrite the existing field values.

Adding Dates

You can add a Date custom field to assets. This can be useful to identify the first time an asset was noncompliant.
For Single Value date fields you can add a single date - the Enforcement action run time or another date.
For Multiple Value date fields you can add the Enforcement action run time (a single date) or a list of other dates.

To add a date

  1. In the Date type field, choose Now (Execution time) or set a Specific date. The times displayed are in UTC.
    • Now (Execution time) sets the date to the Enforcement action run time.
    • Specific date can be either in the past or future.
      • For a Single Value date, in Field value, click Select Date to select a date from a calendar, click select time to select a time, and then click Ok.
        • When you enable the Don’t overwrite values if custom field already exists option, if the Date field already exists on the asset, the date value entered in this enforcement action does not replace the existing date on this field. This can be useful, for instance, if the action added a custom date to show the first time something was found on the system, and you do not want to overwrite this value. Otherwise, if you do not enable this option, the entered date replaces the existing date.
      • For a Multiple Value date, in Field value, click Add Date to select a date from a calendar, click select time to select a time, and then click Ok. Repeat for each date that you want to add.

EnforcementDatePicker.png

Note:

When you create a Dynamic Value Statement for adding a custom date field, make sure to use form.field_date.specific with Date type set to Specific date, as a dynamic date can be written only to this type of Date field. Do not use form.field_date.now or a field with Date type set to Now, as this type of field cannot accept dynamic input and regardless of the statement, its value is always the action runtime.

Adding a List String

To add items to a list string

  • Do one of the following
    • Type the name of the field value and press Enter.
    • Type the name of the field value and press Comma (,).
    • Type the name of the field value and press Semicolon (;).

For example:

  • Type “Paris” and press Enter. A tile named “Paris” is added to the list.
  • Type “London” and type a comma “,”. A tile named “London” is added to the list.
  • Type “Montreal” and type a semicolon “;”. A tile named “Montreal” is added to the list.

MultipleFieldValues

To remove items from the list, click the x in the tile you want to remove.

Additional Fields

These fields are optional.

  • Remove this custom data field from entities not found in the saved query results - Select whether to also remove the Custom Fields from all entities that are not part of the list of assets on which the Enforcement Task ran. To see a list of these assets, view the run history detail and click Additional in the drawer header.

ECRunHistory-AdditionalCustomData.png


For more details about other Enforcement Actions available, see Action Library.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.