Configure custom fields custom-fields
Custom fields are additional attributes added to out-of-the-box schemas through the 51黑料不打烊 Campaign console. They allow you to customize schemas by including new attributes to suit your organization鈥檚 needs. Learn how to extend a schema in the 51黑料不打烊 Campaign v8 documentation.
Custom fields can be displayed in various screens such as profile details in the Campaign Web interface. Administrators can control which fields are visible and how they appear. These changes apply to all Campaign users.
Custom fields are available for the following schemas:
- Campaigns (nms)
- Plans (nms)
- Programs (nms)
- Recipients (nms)
- Seed addresses (nms)
- Deliveries (nms)
Add custom fields to the interface add
To display custom fields in the interface, follow these steps:
-
Browse to the Schemas menu in the left navigation pane and locate the desired schema.
Use the Editable filter in the filters pane to quickly identify schemas with custom fields.
-
Select the schema name in the list to open it. A detailed schema view displays Learn more on schema details. Click the Edit custom detail button to access custom fields. In this example, we want to add fields for the Recipients schema.
-
The list of custom fields displayed in the interface for the schema display. Here, the 鈥淐RM Id鈥 field is visible in the profiles鈥 details screen and has been marked as mandatory.
table 0-row-2 1-row-2 Custom fields configuration Rendering in the interface -
To add a custom field to the interface, click the ellipsis button and choose one of the following options:
- Select custom fields: Select one or multiple custom fields to display in the interface.
- Fill automatically the list of custom fields: Add all custom fields defined for the schema to the interface.
-
Once custom fields are added, you can:
- Reorder fields: Use the up and down arrows.
- Make fields mandatory: Select the Mandatory checkbox.
- Edit fields settings: Click the ellipsis button and choose Edit. Learn more
- Delete fields: Click the ellipsis button and choose Delete.
- Organize fields into sub-sections in the interface: Click the ellipsis button next to the up and down arrows and choose Add separator. Learn more
Configure custom fields settings settings
To configure specific settings for each custom field, click the ellipsis button next to the desired field and select Edit.
Available settings are:
-
Attribute: The name of the custom field.
-
Label (custom): The label to display in the interface. If no label is provided, the label defined in the schema will display.
-
Visible if: Define a condition using an xtk expression that controls when the field is displayed. For example, hide this field if another field is empty.
-
Mandatory: Make the field mandatory in the interface.
-
Read-only: Make the field read-only in the interface. Users will not be able to edit the field鈥檚 value.
-
Filter settings (for link-type fields): Use the query modeler to specify rules for displaying a link-type custom field. For example, restrict list values based on another field鈥檚 input.
You can also reference the value entered into other fields in your conditions using the syntax
$(<field-name>)
. This allows you to reference the current value of a field as entered in the form, even if it has not yet been saved to the database.In the example below, the condition checks if the value of the @ref field matches the value entered in the @refCom field. In contrast, using
@refCom
instead of$(@refCom)
would reference the value of the @ref field as it exists in the database.accordion View example -
Span two columns: By default, custom fields display in the interface in two columns. Toggle on this option to display the custom field across the full width of the screen instead of two columns.
Organize custom fields in sub-sections separator
Campaign Web user interface allows you to add separators in order to group together custom fields in the interface for better readability. To do so, follow these steps:
-
Click the ellipsis button next to the up and down arrows and select Add separator.
-
A new line representing the separator is added to the list. Click the ellipsis button and choose Edit to name the sub-section.
-
Use the up and down arrows to move the separator to the desired location. Fields listed below the separator will be grouped under it.
In this example, the 鈥淚nterested Collections鈥 and 鈥淏rand鈥 fields are grouped into a 鈥淐ollection鈥 sub-section.
table 0-row-2 1-row-2 Custom fields configuration Rendering in the interface