This chapter describes creating the schema for a Runtime Connection table.
This is similar to creating a template form for the user input, or defining a schema for the hosted table.
Creating a new Runtime Connection
Select a folder and click the Create Runtime Connection icon :
The Create Runtime Connection dialog appears, and lets you configure the name, schema and options of the table.
See below for the detailed properties
Name and Description
The Name (compulsory) will be used to identify this Runtime Connection.
The Description allows you to optionally add some complementary information.
Behavior when adding data
Data push mode
The Data push mode defines how new data will be added to the table :
- Append : each a new entry will be appended to the existing table. The first (oldest) entries will be removed if they exceed the Max rows count parameter.
- Replace : each a new entry will completely replace the previous data in the table : all previous rows are removed.
Note : With the Replace mode, you can add multiple rows at the same time if you push data using the web API.
Max rows count
This defines a limit to the table size.
Auto fields
Some fields can optionally be included in the data and filled automatically by Alpana :
- Last Edition Date : will always contain the date/time when the row was last created or edited
- Last Editor Username : will contain the username of the last User who created or edited the row
- Input Dashboard : if the row was created from a Dashboard directly, this will contain the Dashboard name
Adding/Removing fields to the schema
Adding a field
To add a new field to the schema, click the Add Field button, and select the desired field type in the dropdown menu (see below for details on each field type) :
- String
- Number
- Boolean
- Date/Time
- List of choices
Editing a field
After adding a field, a new foldable section is created accordingly.
You can click on the arrow icon to fold/unfold the section :
The section will contain properties detailed below.
Field name
Each field must have a name.
Removing a field
To remove a field, click the trash icon in the section header :
Field configuration properties
Each field can be configured with some properties listed below.
These properties and their meaning depend on the field type.
String
A String field will contain a free-form text value.
Allow null
When a field is configured to Allow null values, then the user can omit filling-in the field in the form, and the data row will contain a NULL
value for this field.
If this is configured to be false, then the field is compulsory, and the user must input a value.
Default value
A Default value can pre-filled when opening the input form :
Max length
The limit on the length of the input string can be configured :
Number
A Number field will contain a real or integer number.
Allow null
When a field is configured to Allow null values, then the user can omit filling-in the field in the form, and the data row will contain a NULL
value for this field.
If this is configured to be false, then the field is compulsory, and the user must input a value.
Default value
A Default value can pre-filled when opening the input form :
Min value / Max value
A minimum and/or maximum value can be enforced for the number input :
Boolean
A Boolean field will contain a true/false value.
Allow null
When a field is configured to Allow null values, then the user can omit filling-in the field in the form, and the data row will contain a NULL
value for this field.
If this is configured to be false, then the field is compulsory, and the user must input a value.
Default value
A Default value can pre-filled when opening the input form :
Date/Time
A Date/Time field will contain a timestamp composed of a date and a time.
Allow null
When a field is configured to Allow null values, then the user can omit filling-in the field in the form, and the data row will contain a NULL
value for this field.
If this is configured to be false, then the field is compulsory, and the user must input a value.
Default value
A Default value can pre-filled when opening the input form, and configured by selecting from a calendar :
Min date / Max date
A minimum and/or maximum date can be enforced for the input.
This means that the user will not be able to input dates before or after these limits :
Allow future
This parameter decides if it is allowed to select dates from the future or not :
List of choices
A List of choices field will contain a list of possible values from which the user can select.
The list of values can be entered in free-form during the configuration, or use a published Data Source to point to data from a database.
Use datasource : getting the list from a Data Source
When this is true, the list of possible values proposed to the user during input will be collected from the field of a published Data Source.
You must select a Datasource from the published Data Sources :
Then select a field from that Data Source, which will be use to retrieve the list of proposed values for input :
Finally, you can view the current list of Values that would be proposed to the user :
Don’t Use datasource : using a custom list
When the Use datasource option is set to false, the list of choices proposed to the user can be configured using the multi-line text input called Values :
Each separate line of text defines a separate choice proposed for entry.
Default value
A Default value can pre-filled when opening the input form, and selected from the available choices :
Allow null
When a field is configured to Allow null values, then the user can omit filling-in the field in the form, and the data row will contain a NULL
value for this field.
If this is configured to be false, then the field is compulsory, and the user must input a value.
Post your comment on this topic.