Data-Types

Data-Types allow Apex Forms to manage different kinds of information using different rules. Numbers, text and dates are not the same thing.
Written by Nick Laughton
Updated 1 year ago

You are probably already familiar with Data-Types from familiar business programs like spreadsheets that allow you to manage text and numbers in a table. A field in a form can be assigned one of a variety of Data-Types.  Looking at the list of available types will help explain the concept.

  • Any

  • Boolean

  • Canadian Postal Code

  • Country

  • Currency

  • Date

  • Date with Time

  • Decimal

  • Document Attachment

  • Email Address

  • Employer Identification Number

  • Integer

  • Object

  • Phone Number

  • Province

  • Signature

  • Social Insurance Number

  • Social Security Number

  • State

  • State Province

  • String

  • Task

  • Zip Code

Below is an explanation of each data type:

Any - The Any data type is just what it sounds like it is. It will hold any type of data and will perform no data validation. It is a generic type and not commonly used by a forms citizen developer.
 

Boolean - True or False?
"Boolean Data-Types can only hold a value of 1 or 0?" - True!

We call it true or false, but when you have a field that can only be one case or the other, like when you're ticking a checkbox for "pet owner" or "steals blankets on cold nights," then Boolean is the data type for you! A field of type boolean will default to a field type of Yes/No and present as a set of 2 radio buttons. It can be switched to a checkbox if you prefer.

Canadian Postal Code - This data-type has built-in format validation and masking for Canadian Postal Codes

Country - This specialized data-type located in the Apex Form Toolkit, is really a field of type string, however it will present itself as a dropdown with a pre-populated list of all the countries. You are able to configure it to store the country name, abbreviation or the ISO code.

Currency - The Currency data type is the first of three specialized numeric data types. It should be used for input fields that hold monetary values. Edits are pre-built into it allowing valid characters and it auto formats with the dollar sign and thousands separator and 2 decimals.

Date - the Date Data-Type holds the Year, Month and numeric day of the Month. It does not keep track of what actual day it is (like Monday, Thursday, or TGIF). Also, it does not keep track of the time. Move on to our next exciting Data-Type when you have a second.


Date with Time - The Date with Time Data-Type keeps track of all the information that Date does, plus it also tracks the Hours, Minutes and Seconds. When you need to capture a time-stamp for a form, or need to know what time a candidate likes to take lunch breaks, then Date with Time is the correct Data-Type.

Decimal - The Decimal data type is the second if the set of three numeric data types. It will support numeric values with a configurable number of places after the decimal (defaults to 1). It does not have any monetary symbols before the value.

Document Attachment - Sometimes a form will need to allow for additional information to be submitted with the field entries. The Document Attachment Data-Type allows you to add a way handle those attachments. You need to use this Data-Type in conjunction with the Document-Attachment Field-Type. That will give you the needed form tools to allow users to find and attach their items for inclusion.

Email Address - The Email Address data type is a special data type located in the Apex Forms Toolkit. Its base type is of type string but it has special validation built in to validate and ensure a properly formatted email address. It does not ensure that the email address is valid.

Employer Identification Number - The EIN data type is a special type located in the Apex Forms Toolkit. It has a sister data type of Social Security Number. The base data type for EIN type is a string, but it has built in validation and auto-formatting for a value in the format of nn-nnnnnnn. The data is stored without the dash in the third position.

Integer - The Integer data type is the third in the series of numeric data types. Unlike it siblings the Decimal and Currency, it does not allow for any decimal values and does not display a monetary symbol before the value. It does insert the thousands separator for you.

Object - The object data type is located in the Apex Forms Toolkit and allows for the passing of a valid JSON object or JSON arrays. It is not common for the citizen developer to use this data type.

Phone Number - The Phone number data type is a special type located in the Apex Forms Toolkit. The base data type for Phone type is a string, but it has built in validation and auto-formatting for a value in the format of (nnn) nnn-nnnn. The data is stored without the dashes or parentheses.

Province - The Province data type contains a pre-defined drop-down list of Canadian provinces.

Signature - The Signature data type is yet another speciality data type located in the Apex Forms Toolkit. its base data type is actually a string but we store a base 64 bit encoded graphic of the electronic signature that the end user scribed using his finger, mouse, or stylus.

Social Insurance Number - The SIN data type is a special type for Canadian Social Insurance Numbers. The base data type for SIN type is a string, but it has built in validation and auto-formatting for a value in the format of nnn-nnn-nnn. The data is stored without the dashes in the fourth and eighth positions.

Social Security Number - The SSN data type is a special type located in the Apex Forms Toolkit. It has a sister data type of Employer Identification Number. The base data type for SSN type is a string, but it has built in validation and auto-formatting for a value in the format of nnn-nn-nnnn. The data is stored without the dashes in the fifth and eight positions.

State - This specialized data-type located in the Apex Form Toolkit, is really a field of type string, however it will present itself as a dropdown with a pre-populated list of all the states and territories.

State-Province - This data-type contains a dropdown with a pre-populated list of all the US states and Canadian provinces in one list.

String - A field with a Data-Type of String is treated like plain old text. You may have heard this referred to as alphanumeric, and that is accurate because you can enter text or numbers into a fields with this data type without triggering any errors or validation problems.

Task - The Task data type hold information about the task that the form is associated with. It is not commonly used by the citizen developer.

ZIP Code - The ZIP code field is for capturing US postal codes in nnnnn or nnnnn-nnnn formats.

Did this answer your question?