0% found this document useful (0 votes)
26 views

2 Data Types

The document discusses data types in Vizor Builder projects, including that a data type defines constraints for schema item values and maps to items. It describes common base data types like numeric, string, boolean, date; and properties of each, including initial values.

Uploaded by

Mohammed Ali
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

2 Data Types

The document discusses data types in Vizor Builder projects, including that a data type defines constraints for schema item values and maps to items. It describes common base data types like numeric, string, boolean, date; and properties of each, including initial values.

Uploaded by

Mohammed Ali
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Introduction to Data Types

2021

Data types are an essential part of any project in Vizor Builder. This module will cover the fundamentals of working with data types.

1
Objectives

1 Understanding Data Types

2 Base Data Types

3 Defining Data Type Initial Values

© 2020 Vizor | Proprietary

2
Understanding Base data types

1
© 2020 Vizor | Proprietary

There are a number of key object types with which you should be familiar before beginning work on a Vizor Builder project. These
include:

Data Type, Schema Item, Schema Scheme, Form Set and Form.

- A Schema Item can be thought of as a variable, or a datapoint – a container into which a regulated entity will fill with some value.
- A Data Type will always map to a schema item. That is to say, a data type can be thought of as a constraint on the values which a
schema item can take.
3
- A Form is an interface which asks for some certain data to be entered by the regulated entity.
- A Form Set is a collection of forms which are associated with each other.
- A Schema is a hierarchical collection of schema items. A schema maps to a form set; that is, a schema can be thought
of as the specification of how a form set relates to datapoints/schema items.

3
Understanding Data Types

A data type is a property of an item – that is, every


schema item has an associated data type.

By definition, a data type defines the type of data that will


be collected. Different types of data can be collected such
as text or numeric values, files, dates etc.

A data type maps to an item – you can think of an item as


a variable that holds a value of a specific data type.

1
© 2020 Vizor | Proprietary

4
Data Type Properties

In order to create an item, we must assign it a data type. This


necessitates creating a data type before creating an item

When adding a data type to a project, you must specify certain


properties.

These include:

• Name (used to identify the data type when assigning to a control)


• Base data type (Boolean, Date, String, Number, File)
• Description (e.g. where & why the data type is used)
• Properties (e.g. min & max length)
• Initial value (e.g. number data type with initial value of 0)

1
© 2020 Vizor | Proprietary

5
Base Data Type

21
© 2020 Vizor | Proprietary

One of the key properties of Data Types is the Base Data Type. The base data types include:

- Numeric Values
- Strings of text characters
- Booleans, that is, binary values which correspond to true or false
- Dates
- Enumerations
- Files which can be uploaded
6
Base Data Type - Boolean

A boolean data type has 2 possible values:


true or false. Boolean data types are mapped
to items which in turn are mapped to controls
on forms.

• Usually ‘boolean’ type controls are radio


buttons allowing a choice of 2 possible
selections. A checkbox can also be a
‘Boolean’ type control on a corresponding
form, i.e. checked or unchecked.

21
© 2020 Vizor | Proprietary

7
Base Data Type - Number

Data types of base type number have several


properties associated with them. These can
limit the values accepted by items using the
data type. These include:

• A minimum and maximum value

• Digits before and after the decimal point

• An automatically assigned initial value

21
© 2020 Vizor | Proprietary

8
Base Data Type – String (Text)

Data types of base type string have several properties


associated with them. These can limit the values
accepted by items using the data type. These include:

• A minimum and maximum length, or number of


characters

• Allowed and disallowed characters

• Regular Expressions, which allow only a certain


format, such as an email address.

21
© 2020 Vizor | Proprietary

9
Base Data Type – Date

• Items with a Data Type of Date base can be


restricted according to the format of the date, such
as dd-mm-yyyy versus mm-dd-yyyy

• Restriction is also possible according to when the


date occurs (such as allowing only past dates, or
future dates.

21
© 2020 Vizor | Proprietary

10
Base Data Type – File

When creating a data type of File base, the following


parameters can be specified:

• The maximum allowed size of an uploaded file

• File extensions which are allowed

• Customisable failure message when rejecting files


which do not conform to the above

21
© 2020 Vizor | Proprietary

11
Base Data Type – Enumeration

• An enumeration is a set of exact values (usually used


for select boxes). Each element of the list must be a
key value (used for referencing) and a corresponding
label value (which is used for display to a user).

• The combination of a key and a value is called an


option.

21
© 2020 Vizor | Proprietary

12
Initial Values

When creating a data type for use in a project, it is


possible to specify an initial value. This value will be
assigned to items with the data type, and therefore
also to controls which map to these items. The initial
value will therefore be displayed to end users
completing a form. An initial value can be
overwritten by the end user.

The available initial values depend on the base data


type. For instance, a data type of Boolean base can
only have three initial values: True, False or Blank.

231
© 2020 Vizor | Proprietary

13
Thank You!

14

You might also like