Introduction Define all cells format

Introduction
Once the template and all its components are defined, the domain manager will edit the Web Form
before publishing it. While editing the Web Form, the domain manager could manage the
presentation of the Web Form (font size and colour, cell background colour, cell locking, spacing,
alignment) and could define all validation rules required.
By clicking on the [Edit] button, the JAVA applet is started and, after a while, the Web Form
template appears on the screen in the JAVA window (see Below).
Define all cells format
In order to promote the formatting and validation tools in the JAVA windows, the domain manager
must click on the promoting tool box little icons
located at the bottom left-hand side of the
edited Web Form. This action will open up the Web Form tool box as shown below.
By clicking for a second time on the promoting tool box icons, the tool box will be display in a full
sized JAVA window.
The Web Form tool box is divided in two parts, the first concerns the formatting tools while the
second relates to the validation tools (see Figures below).
Each cell or group of cells can be formatted as wished. The domain manager can specify the font
name, the attribute (bold, italic), the size, the alignment, the cell width and height, the locking, the
format, the cell background and the font colour and the nomenclature code list which can be used.
The behaviour of the formatting tool box is similar to standard word processor and there are tooltips
which pop up when the mouse pointer goes over the icons.
The code drop-down box is populated with the nomenclatures of type ‘code’.
Each cell or group of cells could contain validation rules. The validation tool box allows the creation
of validation rules on a cell by cell basis. For larger Web Forms, if necessary, there is the possibility
to directly import the validation rules from a structured formatted file (see paragraph Importing
validation rules in Web Forms).
Define simple arithmetic expressions
The domain manager could for each cell define simple arithmetic expressions. As a result, when the
Web Form will have been published and instantiated by a data sender (or by the domain manager),
as soon as a value is entered for a particular cell it has immediate consequences for the calculation
applicable to that cell (‘calculation on the fly’).
In practice, the arithmetic expression can be entered in the function tool bar after having selecting
the corresponding cell (see figures below)
In this example cell B6 will be equal to 4pR² (surface of a sphere) and translated into 4 * (22/7) * B4
* B4 which is the equivalent, where p has been calculated with 22/7 and where cell B4 will be the
input cell for the rayon of the sphere. Once entered, the domain manager will confirm by clicking on
the
button and finally on the [Save] button to save the edited Web Form on the EDAMIS server.
As a result, once published, when the data sender will fill in cell B4, the surface will automatically be
calculated based on the arithmetic expression (formula) provided in cell B6. The same is done for the
cell B8 (Volume) and a ratio which calculates the percentage of increase (or decrease) of the surface
and the volume will also be computed (cells C7 and C9).
Remark: Cell C7 is the result of ((C6-B6)/B6)*100 which express the percentage of increase (or
decrease) of cell C6 compared to cell B6. In the above example, as there are no provided values for
cells B4 and C4, EDAMIS cannot calculate the ratio which is translated with a ‘NaN’ value in the
depending cells. It might be possible that in some circumstances, a division by zero occurs. In this
case, EDAMIS will complete the calculated cells with ‘Infinity’ which is the mathematical result of
the calculation of a limit of a division by zero.
More complex expressions
More complex expressions can be setup using special statistical functions as listed below (see Figure
below) by clicking on the function icon in the validation tool box or else by right-clicking on the
mouse button. By moving the mouse cursor on a function, the corresponding help appears in the
bottom of the ‘insert function’ box.
It is possible to copy and paste data, arithmetic expressions or validation rules within a Web Form
using [CTRL]-[C] and [CTRL]-[V]. Simply select the cell, or group of cells you wish to copy, hold
down simultaneously the [CTRL] and [C] keys to copy, then select the cell or group of cells you wish
to paste to, and hold down simultaneously the [CTRL] and [V] keys to paste. It is also possible to
copy and paste from an external file (Excel, for example) using [CTRL]-[C] and [CTRL]-[V].
Another way of copying and pasting data is using the contextual menu by right-clicking the selected
cell or group of cell and choosing the ‘Copy’ function.
Remark: In the current version of EDAMIS Web Form, the copy/paste function does not take into
account relative and absolute positions of cells. For example, if cell B6 contains the arithmetic
expression ‘= B5 * B4’ when copying and pasting this formula into cell C6, the expression will
remain ‘= B5 * B4’instead of ‘= C3 * C4’. This will be further improved in a next version of EDAMIS
Web Forms.
Define validation rules
Similarly to the definition of arithmetic expressions, the domain manager could define several
validation rules for each cell. As a result, when the Web Form will have been published and
instantiated by a data sender (or by the domain manager), as soon as a value is entered for a
particular cell it has immediate consequences for the validation rules applicable to that cell
(‘validation on the fly’).
Validation rules will be defined with the validation rule tool box. It is possible to define several
validation rules for each cell of the Web Form (see Figure below).
Validation rules could be added, removed, edited or imported by using the appropriate button of the
validation tool box.
Adding a validation rule in a cell
When the domain manager clicks on the [Add] button of the validation tool box, it pops up a JAVA
window allowing adding a rule for the selected cell (see Figure below).
Basic’ or ‘Critical’ error: This error type applies to constraints ‘Mandatory’; ‘Range’ and
‘Expression’. A ‘basic’ error does not prevent of sending a Web Form while a ‘Critical’ error does.
In our example with the sphere, the rule number one is ‘THIS>=0’ for the cell B4 and it is
mandatory and critical: it thus imposes a value for the sphere radius that must be present and
strictly positive. Note that even if the validation rule for this cell is fulfilled, it could generate a new
(broken) validation rule for another cell which might depend on it.
There are two types of error status when a validation rule is not fulfilled: ‘critical’ or ‘basic’.
Whenever the error status of the broken rule is ‘critical’, the official transfer cannot be carried out.
Conversely, when the error status of the broken rule is ‘basic’, the data sender must provide a
justification before carrying out the official transfer. As soon as a correct value is entered in a cell,
corresponding broken validation rules that were initially displayed in the validation window will
disappear for that cell.
Removing a validation rule from a cell
To remove a rule, the domain manager has to select it in the validation rule tool box and must then
click on the [Remove] button (see Figure below).
Note that the domain manager should carefully check if removing the selected rule has no impact on
other rules which might have dependencies. Instead of completely removing a rule, the domain
manager can simply de-activate it by unchecking the ‘Active’ flag.
Editing an existing validation rule
After a rule has been selected in the validation rule tool box, the domain manager can click on the
[Edit] button to update this rule (see ).
Importing validation rules in Web Forms
When pressing the [Import] button of the validation tool box, a JAVA window pops up (see Figure
below).
The domain manager can select the CSV file where the validation rules have been defined and then
click on the [Open] button to import the rules.
The CSV file, where semicolon is used as field separator, consists of:
A single header line describing all the fields defining the rules;
A line per rule where the rule properties are defined;
A footer section to delimit the definition of the rules.
Here is an example of a CSV file where 4 rules are defined:
Cell;Country;Mandatory;MandatoryBasicOrCritical;RangeStart;RangeEnd;RangeBasicOrCritical;Rul
eNum;Expression;ExpressionBasicOrCritical;ErrorMessage;
B1;ALL;Y;Critical;10;20;Basic;1;;;;
B1;ALL;;;;;;2;THIS<50;Critical;Because it has to be the case;
B2;ALL;Y;Basic;;;;1;;;;
B3;LU;Y;Critical;;;;1;;;;
;
FOOTER
FOOTER
;
Changing cell format and using cell locking
The domain manager can format cells by selecting the font name, the font arguments (normal, bold
or italic), the font size, the font alignment, the cell width and height, the cell locking for edition, the
number format of a cell, the font colour and the cell background colour (see below).
This is applicable to each individual cell or to a group of cells.
Cell lock: The cell locking has no relation with the locking mechanism of the Web Form. It only
prevents a data sender to modify a cell where for instance, arithmetic expressions have been
entered. By definition for these specific cells, the result is calculated based on the data sender input
in other cells.
This cell locking can also be used if for some periods the cell value is irrelevant or should not be
provided for specific reasons.
Allowing update of past/future reporting periods
When designing the Web Form, if the domain manager allows the update of past and/or future
reporting periods of the Web Form, the data sender will then also be able to update them (see
Figure below).
In the other case, the cells of past and/or future reporting periods will be locked and thus not
updatable.
In the above example, the domain manager did not allow modifying past and future reporting
reference periods.