Configuring data validation

Custom validation can be enabled for Data Capture and Batch Editor

Written by Raymond Carrel
Updated over a week ago

If you are interested in using this feature, please get in touch with us!

It's possible to add an extra level of data validation to data entered as part of your processes.

This lets you ensure that core and custom field data is correct and complete, by letting you stipulate:

  • Required fields

  • A specific format for cell data e.g.

    • Number of characters

    • Allowed characters

    • Acceptable formats

For example, you may wish to ensure that users are populating IMEIs for service lines, and that they are entering the correct number of digits.

Or, you may wish to make sure that only postcodes of a valid format are entered.

Validation can be applied to the following areas of the system:

  • Quotation Data Capture

  • Sales Order Data Capture

  • Batch Editor (Assets)

Validation can be configured differently for specific items in inventory, or for whole base categories. This allows for validation to vary from product to product.

Validation is especially useful if your data is sent to another system, such as an external billing platform.

Validating data

Validation will be performed when the user enters data in a Data Capture or Batch Editor cell. Invalid data will cause the cell to be highlighted in pink, and a customisable message will be shown.

There is also a Validate button within both Data Capture and Batch Editor. This will perform validation on all displayed lines.

This is useful for performing validation after new rules have been configured, for older data, or for data that was not manually entered (e.g. assets after a Data Manager import).

Quotation-level validation and quotation production

Quotation-level validation affects the data entered in quotation-level Data Capture, if it has been enabled in your instance.

If validation has been set up at quotation level, then all validation requirements must be met before a quote can be produced.

This should be an important consideration if validation rules are to be applied at quotation level.

Sales order-level validation and conversion to asset

Quotation-level validation affects the data entered in sales order-level Data Capture.

If validation has been set up at quotation level, then all validation requirements for a sales order line must be met before that line can be converted to asset.

Clicking Validate will run validation on all lines and highlight any required fields or invalid entries.

Clicking on Convert to Assets will perform validation only on assets with an Action set.

This means that you can convert assets that have all required data entered, without the operation being blocked by incomplete or invalid data in other lines. Incomplete lines can be left with No Action under the Action field.

Asset validation in Batch Editor

Please note that validation of assets only occurs when using Batch Editor. Validation set up for assets will not be respected when editing an asset record.

Configuration - Validation Rules

For each field that requires validation, we can assign a validation rule. A validation rule dictates an acceptable format for data in any fields to which it is applied.

The Layer provides a number of default rules that may be useful in a range of situations. Custom rules can also be configured.

To see the rules available in your instance, go to Settings - Validation Groups and click on Validation Rules on the left side panel.

Each rule is comprised of:

  • Validation Name

    • This will show in the drop-down menu when assigning a rule to a field.

  • Regex

    • This string of characters represents acceptable values for fields to which the rule is assigned. This is important when creating custom rules.

  • Validation Message

    • This forms part of the message shown to users when validation fails.

What is Regex?

A regular expression (shortened as regex) is a sequence of characters that specifies a match pattern in text.

Regex allows you to specify such factors as:

  • allowed characters

  • minimum and maximum string length

  • particular sequences of characters that are allowed or disallowed

Creating a new validation rule

Click the Add New button to create a new rule.

Enter the name, regex string, and validation message, then click submit.

This rule will not take effect until it has been applied to a field via base

category settings or a validation group.

Configuration - enabling validation

Validation can be enabled for inventory items in two ways:

  • By base category

  • By validation group

Base category

From Settings - Inventory - Manage Categories, you can enable a set of validation rules on a per-base category basis

The Is validation set column can be used to quickly check for the presence of any validation for a given field.

The links in the Validation column allow you to enable validation rules for that field.

Validation group

Validation groups allow for the creation of a set of validation rules. This group can then be applied to individual items across base categories.

If an item in inventory has been assigned a validation group, that group's rules will override any that have been set against the item's base category.

A validation group can be assigned from the Product Header tab on an item record.

Creating or editing a validation group

Groups can be viewed and managed from Settings - Validation Groups

Any existing groups will be detailed here. You can click on a group name to edit the rules, or click on New Validation Group.

Enter a name and description, then save to proceed to the configuration.

There are separate tabs for custom and core fields, as well as products and services.

As with base category validation configuration, you can easily see which fields have validation enabled, as they will show a green tick in the Validation Set column.

Additionally, you can quickly disable or enable any configured rules using the three Enable checkboxes. You can consider these as overrides for any rules already applied to that field.

The Validation column links will open the window where you can manage validation rules - see the next section.

Configuration - Applying validation rules to a field

Whether you are using base category-level validation, or validation groups, the link in the Validation column will allow you to apply your existing validation rules to specific fields.

Here you can configure rules separately for asset (batch editor), quotation, and sales order levels.

The options are as follows:

  • Required Field

    • You can choose to make a field mandatory so that the user has to populate the field with a valid value.

  • Use Custom Regex

    • It's possible to enter a regex directly here instead of using a premade validation rule.

  • Validation Rule

    • This menu lists the existing validation rules that can be selected.

  • Validation Message

    • This is the message that will be shown if a user enters an incorrect value. By default, this will be populated based on the rule selected, but you can override it.

In the example image above, we have applied the same validation rule to the MSISDN field for all three stages. However, we have marked the field as a required field for only sales order and asset stages.

This means that the user is not required to enter the MSISDN at quotation stage. However, if they do enter data, it will need to pass the validation checks - i.e. containing only numbers.

Did this answer your question?