Vizlib Writeback Table can help you drive improvements in your data quality by offering validation conditions.
With validation, you can specify rules to check any data entered into a column field. If the data falls outside these rules, the field displays an error. Validation rules can relate to a particular type of data, such as numeric values only, or collecting data in a recognised format, such as an email address, which is the example we're going to use in this article.
Validation ensures the information you collect and hold in your system follows your schema, defined format and appropriate for your requirements, which can open the door to a wide range of benefits for an organisation. As an example, accurate sales data can be used to produce more specialised and focused sales reporting, and can drive improved targets in customer retention and acquisition.
Start using the Validation panel by selecting the column you want to work with (Figure 1). We''ll be using Contact Email in this example.
- Move the Required slider to the right to show Yes to display the validation commands.
- By default, an error message will appear as no text is entered.
Figure 1: Validation Required
- Select one of the validation types from the dropdown (Figure 2). This article uses Email, but you can choose the type which suits your requirements best.
- Alphanumeric - value must contain letters and numbers.
- No Validation - value not restricted by any conditions.
- Email - value must be a valid email address.
- Phone - value must be a valid phone number.
- Alpha - value must contain letters only.
- Regex - value must contain a specified regular expression (e.g. password format).
- Expression - value must match a specified Qlik Sense expression.
Figure 2: Validation Selection
- You can edit the Error Message in the text box (the default is Invalid value).
- The Required Label text is shown in the column header, and is blank by default, but it can be used to add a short instruction to guide the user about entering the correct data (Figure 3).
Figure 3: Edit Labels
- To test the validation rules, enter a valid email address in the column field. The error message and the red field border should both disappear (Figure 4).
Figure 4: Validation Success