Property Reference


When creating a property you can choose from different types and set of options for these types. The property types determine what kind of data would be stored into the fields you create. The following types of properties are included in the Betty Blocks platform.

General property settings

Sample

All properties mentioned have a couple settings in common: Name, Label, Default value, Apply default when blank, Index values, and Dependent items. The description below applies to all properties:

Name
The name describes the new property and is in lowercase letters! This name field is how the database identifies your property. Your application takes care of placing underscores when your property name consists of multiple words.
Label
The label describes what will be shown in the user interface (to you as a user) and is in most cases the same as the Name field. If the label field is changed after the property is created your Name field would not change. The Name field of the property is not changed on database level.
Default value
Is the (editable) starting value (date) of this property when a new record is added.
Apply default when blank
Check this option if you want to apply the default value when a record is empty when saved.
Index values
Use this checkbox when you often expect to search on a column.
Dependent items
These items are linked to this property. When you delete this property, a part of the linked views, components, references, properties, etc will be destroyed.

Property validation settings

Beside the expression properties (text, number, etc.), do all properties have options for validation. Validation on presence and uniqueness are for almost all properties default validation settings:

Validates presence
This validation makes sure the field of this property is not empty.
Presence when
This validation makes sure the field of this property is filled in when a condition is fulfilled.
Validates uniqueness
This validation makes sure that the entered data is unique in the current column.
Uniqueness when
This validation makes sure the field of this property is filled in when a condition is fulfilled.

All property types to store information

Sample



Auto increment

This property generates sautomatic incremented values for example invoices. In case of tax returns, this property is very useful.

Format
Is an expression which generates the final value. So, 2016H00001 could be set as expression 'year(today) + 'H' + var:counter'. The record 'var:counter' is an automatic incremented value.
Sequence identifier
Is an expression that determines the array. If we use the previous example 'year (today)': when the array recognizes a new year, the 'var:counter' starts again with '00001'.
Start value
Is the start value of a new range (from var:counter), like default = '1'.
Counter fill character
Is the character that is used to fill the counter (default = '0').
Counter width
Is the number of characters that 'var:counter' should have (so '1' is '1', '2' is '02', '3' is '001').
Set automatically
Use this checkbox to set the value during the create. When this one is deselected, you can select it at a later time in the form component or model action using 'auto_increment_set' (set it before update). For example in concept invoices to make it permanent.



Checkbox

This property generates a clickable checkbox, which gives as text output "true" or "false".



Checkbox expression

This property is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Checkbox, only used as an expression.

Expression
The information in these fields is generated by using an expression using the existed data from other properties or characters between quotes ("/"). The expressions can’t be filled in through the view page.



Count

This property counts the number of records from a collection.

Collection
Select a (related) collection to count in.
Periodic
Use this checkbox to enable periodic saving.
Period
(visible when periodic is selected) Select a date or date time property which the periodic can use to measure.
Periods
(visible when periodic is selected) Sets the interval of the periodic saving. This can be every year, quarter, month, week or day.



Date

This property is used to save a date with a timestamp. It has been set to a standard of Day-Month-Year.

Format
Change the date format if needed in the format field.



Date expression

This property is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Date, only used as an expression.

Format
Change the date format if needed. 
Expression
The information in this field is generated by using the existed data from other properties or characters between quotes (" + "). 



Date time

This property is used to save a date with a timestamp. It has been set to a standard of Day-Month-Year and Hour-Minute-Second.

Format
Change the date format if needed in the format field.
Index values
Use this checkbox when you often expect to search on a column.



Date time expression

This property is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Date Time, only used as an expression.

Format
Change the date format if needed in the format field.
Expression
The information in this field is generated by using the existed data from other properties or characters between quotes (" + ").



Email address

This property contains validators that make sure the data in this field has the same properties as a general e-mail address.



Email message

This property is used when an e-mail bounced from a mail server. Here you can add an action, put in a certain status or inform a user.

Several event actions
The event actions are differentiated in send, deferral, hard bounce, soft bounce, open, click, spam, unsub and reject event action. You can add an action when e-mails are opened by the receiver. An action can add to each event.



File

This property holds an uploaded file that could have different extensions, like jpeg or xls.

Public
Use this checkbox if the file should be accessible for everyone.
Extension white list
Set the different extensions that can be uploaded. This field is automatically filled in with the extensions jpg, jpeg, gif, bmp, png, txt, csv, pdf, doc, docx, xls, xlsx, ppt, pages, numbers, key, gz, rar and zip. 



Iban

This property contains validators that make sure the data inserted have the same properties as a normal IBAN number.



Image

This property holds an uploaded image that could have different extensions.

Public
Use this checkbox if the file should be accessible for everyone.
Sizes
Set in this field the width (px), height (px) and strategy (resize to fill, resize to fit, resize to limit and resize and pad) of an image.
Extension white list
Set the different extensions that can be uploaded. This field is automatically filled in with the extensions jpg, jpeg, gif, bmp, and png.
Optimize for web
Use this checkbox to optimize images for the web use. 



List

It holds a predefined set of data which can be used as a radio button group or as a list select on forms. You can enter data in the values of the list. The presented value of this property is always one of the existing values in this list.

Values
Add different values to the list. For example, make a list for different statuses: active and non-active.
Color
Give each value a different color wich is shown in the user interface. 



Minutes

This property can be used to store time in minutes.

Validates greater than
This validator checks if the input is greater than the given value.
Validates less than
This validator checks if the input is less than the given value.



Minutes expression

This is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Minutes, only used as an expression.

Expression
The information in this field is generated by using the existed data from other properties or characters between quotes (" + ").



Multi file

This holds multiple files of different extensions at once instead of using different properties to store all files.

Extension white list
Set the different extensions that can be uploaded. This field is automatically filled in with the extensions jpg, jpeg, gif, bmp, png, txt, csv, pdf, doc, docx, xls, xlsx, ppt, pages, numbers, key, gz, rar and zip.
Public

Use this checkbox if the multiple files should be accessible for everyone.



Multi image

This holds multiple images of different extensions at once instead of using different properties to store all files.

Extension white list
Set the different extensions that can be uploaded. This field is automatically filled in with the extensions jpg, jpeg, gif, bmp and png
Public

Use this checkbox if the multiple images should be accessible for everyone.



Number

This holds a whole number (integer).

Validates greater than
This validator checks if the input is greater than the given value.
Validates less than
This validator checks if the input is less than the given value.



Number expression

This is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Number, only used as an expression.

Expression
The information in these fields is generated by using an expression using the existed data from other properties or characters between quotes ("/"). The expressions can’t be filled in through the view page.



Number with decimal

This property is a number with a given amount of floating numbers.

Max number of digits
As it says is it the max number of digits of the value.



Number with decimal expression

This is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Number with decimal, only used as an expression.

Max number of digits right to the point
As it says is it the max number of digits right to the point.
Expression
The information in these fields is generated by using an expression using the existed data from other properties or characters between quotes ("/"). The expressions can’t be filled in through the view page.



Password

This property holds a password. For example, one password of your internal employees or customers  After the property is saved on forms, the characters are hidden and replaced with asterisks(*).



Pdf File

This property holds a generated Pdf file like conditions.

Template
Select a predifned template which is already created at Templates under 'Tools' or create a new one after the property is saved.
Allow regenerate
Use this checkbox if it should be able to regenerate the file.
Allow remove
Use this checkbox if it should be possible to remove the created file.
Filename
Set a name for the new Pdf file. You can also create a dynamic filename by adding Liquid tags to the file name. Filename_{{record.id}}



Phone number

This property holds a phone number.

Validates max length
This validator makes sure the input doesn’t reach the set max amount of characters.
Validates min length
This validator makes sure that the input is at least the given amount of characters long.



Price

This property holds numbers which are validated as a price in different currencies. 

Currency
Set in which currency the price should be. The current options are Euro, Dollar, Pound, Danish krone, Norwegian krone, Rand, Swiss franc, and Swedish Krone.
Scale
This represents the number of digits following the decimal point. Normally this is set to a number 2 for an output of: 0,00



Price expression

This is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Price, only used as an expression. 

Currency
Set in which currency the price should be. The current options are Euro, Dollar, Pound, Danish krone, Norwegian krone, Rand, Swiss franc, and Swedish Krone.
Scale
This represents the number of digits following the decimal point. Normally this is set to a number 2 for an output of: 0,00
Expression
The information in this field is generated by using the existed data from other properties or characters between quotes (" + ").
For example: sum(var:record.invoice_rules.total_price_excl_vat) and var:record.price_excl_vat + var:record.vat_total and var:record.price_total_excl_vat * (var:record.vat_percentage / 100)



Rich text

This property contains Rich Text formats to use HTML as a textbox on a page. It supports text formatting, such as bold, italics, and underlining, as well as different fonts, font sizes, and colored text.



Signed pdf

This property holds pdf files which are signed by a company or customer. The property is connected to a source property, signed document property and receipt property.

Configuration
.
Source
A signed pdf file can assigned to a property, so the different documents are parted.
Signed document
.
Receipt
.



Sum

This property sums all the values of a property, optional for a certain period.

Property
Add the relevant property for the sum.
Periodic
Use this checkbox to enable periodic saving of the sum.
Period
Select a date/date time property which the periodic can use to measure time.
Periods
Set the interval of the periodic saving. This can be every year, quarter, month, week or day.



Text (multi line)

This property has the same conditions as a text single line but can hold large amounts of characters. If the single line is too small for the data that needs to be stored you can use the text multi line. 

Append default
Checks this option when the property may save empty fields without showing the default value.
Validates max length
This validator makes sure the input doesn’t reach the set max amount of characters.
Validates min length
This validator makes sure that the input is at least the given amount of characters long.
Validates format of
This validator makes sure that the input is in the right format.



Text (single line)

This property holds a sequence of zero or more Unicode characters. It basically holds text up to 255 characters. If this field needs to hold more than 255 characters, use the “Text (multi-line)” property.

Validates inclusion of
Add values which have to match with the input of this property.
Validates max length
This validator makes sure the input doesn’t reach the set max amount of characters.
Validates min length
This validator makes sure that the input is at least the given amount of characters long.



Text expression (multi line)

This is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Text (multi line), only used as an expression.

Expression
The information in this field is generated by using the existed data from other properties or characters between quotes (" + ").



Text expression (single line)

This is an expression property, so it is a read only. It includes pieces of custom functionality and is the same property as Text (single line), only used as an expression.

Expression
The information in this field is generated by using the existed data from other properties or characters between quotes (" + ").



Time

This property is used to save a timestamp. It has been set to a standard of Hour-Minute.

Format
Change the format if needed in the format field. Default it sets as Hours - Minutes. 



Url

This property holds a web link. The entered data will be saved as a clickable web link.



Zipcode

This property contains validators that make sure the data entered has the same properties as a regular zip code in the Netherlands.


Didn’t find what you want?Ask your question on the forum!