There may be situations where you want to control the values that users enter into forms.
For example you may wish to ensure that values entered are within a certain range or alternatively you may wish to prohibit either the entry of negative numbers or the entry of a number which causes a negative value to be the outcome of a related calculation.
This type of control can be managed using Error Hierarchies and this article summarises the steps which should be undertaken to set one up.
Further information is available in the product Reference Guides which are available from the Download Section of our website.
Where applicable we have included screenshots for clients who are on the old legacy thick client Maintenance Application and also screenshots from the newer browser based maintenance console.
Step 1 - Create An Error Table Definition
Error Table Definition as seen in the thick client maintenance application
Error Table Definition as seen in the browser
When creating an error hierarchy you should start by defining the scope or range of data that will be considered when the error checking takes place.
- Go to Error Table Definitions (Maintenance/Error Criteria in the Maintenance Application or Data Maintenance/Rules & Values if using the more recent browser based maintenance tools).
- Give the Error Table Definition a name (in this case we have called it "Catch A Negative".
- Define the criteria or scope of this check. In this case we have defined it as Employee Company. In other words we are saying that this check should be done against all the employees in a particular company.
Step 2 - Create An Error Hierarchy
Error Hierarchy as seen in the thick client maintenance application
Error Hierarchy as seen in the browser
After creating your Error Table Definition you should assign it either to an existing Error Hierarchy or you should create a new Error Hierarchy.
- Go to Error Hierarchy (Maintenance/Error Criteria in the Maintenance Application or Data Maintenance/Rules & Values if using the more recent browser based maintenance tools).
- Create a new Error Hierarchy or open an existing one. In this example we are assuming that a new one is being created. Give the Error Hierarchy a name (in this case we have called it "Catch A Negative VH".
- Assign the previously created Error Table Definition to the Error Hierarchy.
- Define the Error Condition (ie Error or Warning or Valid). In this case we have chosen "Error" which means that a breach of this rule will not be allowed.
- Indicate when this rule should be checked. In almost all circumstances you will want the value here to be "All".
- Select whether you want this rule to be applied to Timesheets, Forms or Attendance Forms. In this case we are going to select Forms.
- Finally, indicate the workflow stage at which this rule is applied. In this case we have said at the Entry stage, meaning that the rule will be applied when employees try and submit the form.
Step 3 - Create An Error Table
Error Table as seen in the thick client maintenance application
Error Table as seen in the browser
The final step in the process is to create an Error Table which specifies the particular outcome that is to be checked and the message that is to be displayed if the rule is breached.
- Go to Error Tables (Maintenance/Error Criteria in the Maintenance Application or Data Maintenance/Rules & Values if using the more recent browser based maintenance tools).
- Create a new Error Table and enter the data required. This will be based on the settings you chose in the Error Table Definition. In this example:
- Choose the Period Type against which this rule will be considered. In most cases you will choose "A" for Accounting Period".
- Select the From Period. This is the period from which this rule will apply. It will be applied for all transactions with a Transaction Date equal to or later than a date in this Period (and will continue to apply until a Value Table with a more recent date is created.
- Choose the Calculation that is going to be checked. In this case we are asking the system to check the Claim value because we do not want the user to be able to enter a negative value into the Claim field. Alternatively you might want to check a calculated value such as "Net" to ensure that it is never negative (for example to stop employees entering a VAT figure which is greater than the Gross figure).
- Enter the From & To Values. In this case we have entered "-999999" and "-0.0001" meaning that if anybody enters a value between these ranges then an error will be displayed. Normally only Value 1 needs to be used.
- Indicate the Error Condition (ie Error or Warning or Valid).
- Enter the warning text to be displayed.
Step 4 - Test
Error being displayed on a form after a negative value is entered