Skip to content

Configuring a data form

ValentinoAvonEFSA edited this page Nov 22, 2017 · 2 revisions

European Food Safety Authority

Configuring a data form

The EFSA-RCL provides a predefined structure for collecting data from the users. In particular, the basic component is an editable table which can be filled with data, which are automatically saved into a local database by the EFSA-RCL as they are inserted/edited. The structure of the table and the columns properties can be defined in an external configuration file, called tablesSchema.xslx. Each excel sheet represents a EFSA-RCL table (which is identified with the name of the sheet). In particular, each row of the sheet represents a variable which needs to be collected, while each column defines a specific property of the variable. A sheet should contain the following properties (columns) to be considered a valid configuration:

  • id: an identifier which uniquely identifies a variable.
  • code: a code for the variable.
  • xmlTag: this field is required only if the considered variable will be exported in the .xml file. In that case, this field specify the tag of the xml node which will contain the variable value.
  • label: the name of the variable which will be shown to the user in the user interface.
  • tip: a tip which will be shown to the user when the mouse is laid on the column name in the user interface.
  • type: the type of the variable, can be string, u_integer (unsigned integer), picklist (catalogue values, code/label pairs) or foreignKey (key for identifying the parent of the row if needed).
  • mandatory: Yes => if the field is not filled the related row of the report will not be considered correct, No => the field can be left blank. Note that a Yes value should be put only for fields which are editable and visible.
  • editable: Can the variable be edited by the user? (Yes/No). Note that the variable should be visible in order to be also editable.
  • visible: Is the variable visible to the user in the user interface? (Yes/No)
  • picklistKey: Only for pick-list variables. It specifies the main node of which pick-list (xml file) should be used for getting data from the user. A pick-list should be put inside the picklists folder.
  • picklistFilter: Only for pick-list variables. It specifies an identifier which is used to get only a set of values from the pick-list. This is usually used if the pick-list value depends on other variables.
  • defaultCode: The default code of the considered variable, which will be put in each report row as soon as it is created.
  • codeFormula: The code value of the variable is automatically computed by solving the formula specified here. Note that formulas only work with non-editable fields.
  • defaultValue: The default value (i.e. label) of the considered variable, which will be put in each report row as soon as it is created.
  • labelFormula: The label value of the variable is automatically computed by solving the formula specified here. Note that formulas only work with non-editable fields.
  • putInOutput: Should the row be put in the .xml reports which will be generated by the tool? (Yes/No)
  • order: Numeric value, it specifies the order of the visible table columns.
  • naturalKey: Is the variable part of the natural key of the report row? (Yes/No)
Clone this wiki locally