Feature Rich
Rapid Application Development
Helping you or your customers
Manage their Business

An Object, its Data Types and its Parts

Quick links to the following topics
Data Types by Parts Data Types Definitions Parts 1 & 2 Part 3

What is an object?

An object in UDB is used to either store or reference data. All objects are made using one, two or three primary parts with the parts being called Part 1, Part 2 and, you guessed it, Part 3. Each part can represent a different data type depending on the data you are storing. Be aware that part options change depending on what Data Type you are using.

So a very basic theoretical example is as follows :-

An object to hold a flavour of ice cream, the price it retails at as well as a list of it ingredients may look like this

Part 1 could have the data type set to Character, for the flavour
Part 2 could have the data type set to Base Currency, for the retail price
Part 3 could have the data type set to XML to store the list of all the ingredients

Below is a list of Data Types that we can use for each of the three parts. Please note that they change slightly from one part to another.

A list of Data Types shown by Parts.

Number Part 1 Data Types Part 2 Data Types Part 3 Data Types
0 Current Object ID None None
1 Object ID Character
2 int int Text
3 Sequential Int Sequential Int Encrypted Text
4 Base Currency Base Currency UDB Code
5 Sec. Currency Sec_Currency
6 boolean boolean XML
7 Double Double
8 datetime (dd/mm/yyyy hh:ii:ss) datetime (dd/mm/yyyy hh:ii:ss) CSS
9 date (dd/mm/yyyy) date (dd/mm/yyyy) Javascript
10 month (mm/yyyy) month (mm/yyyy) XML Field Definition
11 year (yyyy) year (yyyy) XML Email Definition
12 time (hh:ii:ss) time (hh:ii:ss) Query
13 Datetime (yyyy-mm-dd hh:ii:ss) Datetime (yyyy-mm-dd hh:ii:ss) JSON
14 Date (yyyy-mm-dd) Date (yyyy-mm-dd) XML SMS Definition
15 Month (yyyy-mm) Month (yyyy-mm)
16 Character Character HTML
17 Email Address Email Address Encrypted HTML
20 Image URL Image URL
21 Audio URL Audio URL
22 Video URL Video URL
23 File URL File URL
24 Document URL Document URL Main Template
25 JS Document URL Edit Main Template
26 CSS Document URL Sub Template
27 Edit Sub Template
29 Google Drive Doc.ID List Template
30 Sequential Character Sequential Character Application Page
31 Menu Heading Expression

As you may have noticed from looking at the table above there are many fields in common between Part 1 and Part 2, whereas Part 3 is quite different but they do all have the Data Type of Character in common.

Part 1 is generally used to hold the objects primary field. e.g. a Company Code, an Invoice number, a Stock Code or a page title.

Part 2 is generally used to hold some additional important information such as the Company Name, the Image URL or a Stock Item Description.

Part 3 is used to hold more complex data types, like XML, CSS, HTML and Templates. Having XML in Part 3 allows you to store any number of values in XML format, using the Ultimate Admin Area to define them.

Also of note is that Part 1 must exist, whereas Part 2 and Part 3 can be set to type None and not used.

Date Type Definitions

Here is a brief description of the different Data Types.

(0) Current Object ID  is used to make the Part 1 field equal to the current object ID. 

(1) Object ID  is used in Part 2 so that you can hold the Object ID of another object.

(2) Integer is the typed integer. Holds positive and negative integers using 8 bytes signed integer range. -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

(3) Sequential Int is used where you would like a self incremental sequence of integers for this field. If you would like counters based on a parent object relationship this is possible using the Sequential Relationship ID stored on the list. The system counts up from the last highest entry in the list.

(4) Base Currency is a monetary value in the currency of the organisation using the software.

(5) Sec. Currency is a monetary value in an alternative currency, works with currency coded items to correctly evaluate them in the base currency.

(6) Boolean a holder for a Boolean (TRUE / FALSE) value. Stores a 1 or zero in the value field.

(7) Double holds a floating point value.

The Double type has a Decimal Places setting to adjust how many decimal places to show. So for money you would usually use 2 decimal places. e.g. 12.25

(8) Date/Time a field to hold a Date / Time value. The field prompts for dd/mm/yyyy hh:mm:ss and if you click the calendar icon it shows a calendar display as below.

(9) Date prompts prompts for dd/mm/yyyy format with a similar calendar box, just without the hh:mm:ss option.

(10) Month holds a month and year value, prompts for mm/yyyy format.

(11) Year holds a year value, prompts for a year in yyyy format.

(12) Time holds a time, prompts for time in the hh:mm:ss format. If you click the clock icon you will see a time display as below.

Types 8, 9, 10 and 11 are interchangeable. So basically, if the user is prompted for a date and they only have a month, they can enter that and the data type of the field will change from type 9 to type 10.

Data types 0 to 12 also store a value representation of the field in the objects Value 1 and Value 2 fields.
These can be referenced using UDB code and used for sorting.

(13) Date/Time (yyyy-mm-dd hh:ii:ss). This will prompt for a date time in the format dd/mm/yyyy, but store the date as yyyy-mm-dd

(14) Date (yyyy-mm-dd) This will prompt for a date in the format dd/mm/yyyy, but store the date as yyyy-mm-dd

(15) (Month) This will prompt for the month in the format mm/yyyy, but store it as yyyy-mm

Date Types 8, 9 and 10 can hold dates to several million years BC or AD but also use a value for sorting and comparison purposes.
Date Types 13, 14, 15 can only hold dates for years 0000 to 9999 but do not need to use one of the value fields.

(16) Character fields hold up to 500 characters.

The Character data type, holds string data. The size limit for a string in Parts 1 & 2 is 500 characters. Part 3 size is unlimited. Data Entry Restriction limits the input format to the following options. If left with '...' selected then no restrictions apply.

(17) Email Address field holds an email address. The input should match a valid email address.

(19) URL holds a web address. The value should be in a web URL format.

(20) Image URL holds a URL pointing to an image.

The system will automatically manage the two thumbnails for the images. One 100x100 pixels and the other 300x300 pixels.

(21) Audio URL holds a URL pointing to an audio file. (MP3/MP4/MPEG/OGV/WEBM)

(22) Video URL holds a URL pointing to a video file (YouTube/Vimeo links)

(23) File URL holds a URL to a file of any type.

(24) Document URL holds a URL pointing to a document.

(25) JS Document URL holds a URL pointing to a JavaScript (.JS) file. This might be a Javascript file hosted by a different domain.

(26) SS Document URL holds a URL pointing to a Cascading Style Sheet (.CSS) file.

(29) Google Doc ID holds the ID of a google. document.

(30) Sequential Character is used in a similar way to Sequential Integers, allowing for a sequence to count up, including alphanumeric.

(31) Menu Heading used to hold a menu item name, please see the guide on Menu Heading for more details.

(31) Expression is not generally used to hold data, but is used to hold development details / code. It has an icon to browse to the object containing the code. Does not always generate form content, but may be used to modify form actions.

When setting up some types, you will be prompted for some additional fields, as shown below:

Image URL, Audio URL, Video URL, File URL, Document URL, JS Document URL, CSS Document URL and Google Doc ID:

Document Upload Folder is an optional fixed destination for files being uploaded. This is useful if you want to force the user to store all the images in a single location, such as staff profile pictures.

Parts 1 & 2

Form Field Descriptions

Label is the object identification, used when editing and displaying the final value. This can be anything you like.

Size is only used when a special size field or checkbox is required.

  • For check-boxes this is measured in columns, default 3.
  • Radio buttons default is 1.
  • For a text field, if you specify the size, it's in characters (size*9+33) based on the normal font. Size defines the max width of the element.

Default is the default value for the field.

Place Holder is place holder that is visible in grey in an input box, or radio button default option.

Help is descriptive text that appears when you hover over an input field.

HTML Auto Complete Name provide automated assistance in filling out form field values. You can use the word 'off' to prevent auto-filling the field. A list of standard fields are available here

Field Set Number allows you to group fields together under a Field Set Number, you can then set a field name to title the group using the Other Options, Field Set Details. Additional reading regarding Field Sets can be found here.

Part 3

Part 3 contains the following fields for all types, and are the only fields for these Part 3 types: Character, Text, Encrypted Text, XML, CSS, Javascript, XML Field Definition, Email Definition, Query, Object Trigger Code, SMS Message Definition.

These are the field definitions

Label is the object identification, used when editing and displaying the final value. This can be anything you like. 

Text Box Size is the size of the input text box selected from the size list below.

Help is descriptive text that appears when you hover over an input field.

Field Set Number allows you to group fields together under a Field Set Number, you can then set a field name to title the group using the Other Options, Field Set Details.

And these are the type definitions

Encrypted Text holds encrypted data. The field is encrypted within the database, and is decrypted when used.

XML holds a list of XML fields. These need to be added using the UDB Admin Area to add 

CSS holds CSS Cascading Style Sheet code. 

JavaScript holds minified version of the JS in a file and non minified in the database. Put /* no minify */ at the top of the JS to prevent minification.

XML Field Definition holds the definition of an XML field. Is used by the system to hold definitions of XML fields.

Email Definition holds the template for a potential automated email.

Query holds a database query expression.

Object Trigger Code is being deprecated. Runs code based on a condition. 

SMS Message Definition holds the template of an automated SMS message.

For some types there are some additional fields, as shown below: UDB Code, HTML, Encrypted HTML, Main Template, Edit Main Template, Sub Template, Edit Sub Template, List Template, Applications Page:

These are the field definitions

Embed Link on HTML allows the embedding of html into a page. The contents effectively exists as a copy, not a link.

Glossary Link on HTML implements a link to a glossary list object.

Text Link on HTML allows the embedding of text into the page content. 

And these are the type definitions

UDB Code holds USB code.

HTML holds html code.

Encrypted HTML holds html as encrypted code in the database, and un-encrypts it for use.

Main Template holds a Main template, used to define the default site layout. It needs to include the command {MAIN_PAGE} to tell the system where to position the page content defined by the Sub Template.

Edit Main Template holds an Edit Main template. This is used to hold the default layout when editing objects on the site. It needs to include the command {MAIN_PAGE} to tell the system where to position the edit fields defined by the Edit Sub Template.

Sub Template holds a Sub Template, used to display an object.

Edit Sub Template holds an Edit Sub Template, used when editing an object.

List Template holds a List Template, used with the {LIST()} command.

Application Page is used to hold a normal web page.