Expertsystemen

 

Advanced custom Input Types

If you want an input to be mandatory, or a number with a maximum, you can use custom input types.

In Custom input types we manipulated the input types from inside the Question window. You can easily access all the input types, called data types from the menu Resources > Data types.

If Expert mode is off, you will just see the data types which have a list of answers. If you switch to expert mode by clicking [Expert mode], you can access all the data types.

Selecting expert mode
Selecting expert mode

In the window you can create, copy, change or delete data types. You can see a green square in front of some of the data types, this means the data type is currently used by the model. Deleting it is possible, the Studio will ask which other data type must replace it.

Adding a data type

The base type is the basic type of data, a number is something else then some text (string).

The list of base types is:

  • Element (default)
  • String (text)
  • Integer (a number)
  • Boolean (Boolean, true or false)
  • SetOfString (a list of texts)
  • SetOfInteger (a list of number, not used)
  • Date (a date)
  • Time (a time)
  • DateTime (a date and time)
  • Blob (text containing multiple lines)
  • Graph (used for dataset interfaces)

If you select a base type, the Studio shows the options that come with that base type.

Creating a data type
Creating a data type

The various options are:

Required

All of the base types have this option. If checked, the end-user must give an answer. In case of a checkbox, the end-user must set the checkbox to ‘checked’.

Readonly

All of the base types have this option. If checked, the end-user will see the interface, but will not be able to change it.

Placeholder

Only available in text-interfaces. This is a text that will be shown in the interface, if the interface is (still) empty. This is a great and modern way to give the end-user some extra guidance for filling in the text-interface.

NOTE do not use this instead of a label: labels are guaranteed to always be present and visible to the end-user, while placeholder text disappears as soon as the user starts typing.

Stringmask

Only available in text-interfaces. You can specify with a regular expression to check if the text has the right format. An examples is a postal code.

Error text

If the regular expression given in Stringmask indicated that the input is not OK, then an error message is presented to the end-user. You can specify that error-message here.

Minimum

If the base type is a date or number, there can be a minimum value. The end-user will be presented with an error if he or she tries to give a date earlier or a number smaller than the minimum.

Maximum

If the base type is a date or number, there can be a maximum value.

Maximum characters

With String and Blob base types, you can set a limit to the number of allowed characters.