The validation editor is used to define and manage a validation.
This page can be accessed from the Validations Dashboard . From the menu, select 'Config Workbench' under the 'Administration' section.
From the configuration workbench, select 'Field Validations' from the 'Forms and Workflow' section.
The Info section contains the basic attributes of a validation.
Text fields are a single line format containing alphanumeric text, numbers and currency values of a specific format or a regular expression
When selecting this type the following properties are displayed:
Text fields are a multi line format containing alphanumeric text. Text areas cannot be formatted in a specific way like a text field.
Date fields support the pop-up date selector window.
Static drop-downs are used for a set of predefined list values.
Although there is no limit to the number of list items, these do not allow searching within the list so are best suited to lists that are not too long
Static lists can be easily maintained by an administrator without technical SQL knowledge
Static lists do not support the selection of multiple values.
Click on '+' to create new values.
Click on the bin/trash can icon to delete values
Reorder the list by dragging the list item via its handle (2 columns of 5 dots to the right of the record) up or down.
SQL dropdowns are used to create a dynamic list generated by an SQL query
The query must generate 3 fields: A code, a meaning and a default flag.
Use the order by in the SQL query to order the list as required
Use the 'Test' icon on the top right side of the query editor to validate the query entered.
The following SQL is provided as an example.
select id hv, name vv, 'N' default_flag FROM <table> order by 2
Autocompletes are used to create a dynamic list generated by an SQL query
The query must generate 3 fields: A code, a meaning and a default flag.
Use the order by in the SQL query to order the list as required
Autocompletes are best suited to long lists as they include the ability to filter the list.
Autocompletes support the selection of multiple values
Use the 'Test' icon on the top right side of the query editor to validate the query entered.
The following SQL is provided as an example and queries all programmes in the PPMAnywhere solution ordered by programme name
select id lookup_code, name meaning, 'N' from programmes order by 2
File attachments fields allow the attachment of a single file in a specific field.
There are no additional properties for a file attachment field
Table field validations are used to capture a table of data comprising rows and columns in a single field.
An example might be a list of actions for a risk form.
Reorder the columns by dragging the column via its handle (2 columns of 5 dots to the right of the record) up or down.
SQL Textfields are ones which derive their value from one or other fields on the form
The query must generate 3 fields: a code, a meaning and a default flag. The code and the meaning can be the same
Use the 'Test' icon on the top right side of the query editor to validate the query entered.
The following query can be used as an example and returns a numerical value based on 3 risk questions:
select
(
case when '[P.RISK_QUESTION1]' = 'Y' then 1 else 0 end
+ case when'[P.RISK_QUESTION2]' = 'Y' then 1 else 0 end
+ case when'[P.RISK_QUESTION3]' = 'Y' then 1 else 0 end
) lookup_code
,
(
case when '[P.RISK_QUESTION1]' = 'Y' then 1 else 0 end
+ case when'[P.RISK_QUESTION2]' = 'Y' then 1 else 0 end
+ case when'[P.RISK_QUESTION3]' = 'Y' then 1 else 0 end
) meaning
,
'N' default_flag
The user selector validation type is used to select a user for a field.
The query must generate 3 fields: a code, a meaning and a default flag. The code and the meaning can be the same
Use the 'Test' icon on the top right side of the query editor to validate the query entered.
select
u.id lookup_code,
concat(first_name, ' ', last_name) meaning,
'N' default
from
users u, regions r
where r.name='EMEA'
and r.id=u.region_id
To copy a validation to a new one, click on the drop-down menu to the right of the 'Save' button.
Click on 'Copy'
Enter a name for the new validation and click on the 'Copy' button.
A validation can be deleted only once all references have been removed.
Click on the 'Used By' tab to validate where the validation is used and to verify there are no dependencies.
Click on the drop-down menu to the right of the 'Save' button.
Click on 'Delete'
A warning is displayed if dependencies remain, otherwise the validation is deleted. This action cannot be reversed.
Use the 'Used By' tab to view a list of items which use this validation. This can be used to identify the impact of any change to the validation.
The history tab shows previous versions of the validation. Click on 'Restore' to restore the validation to an earlier version.
The version prior to restoring is retained at the top of the list.