Input Masks

From Lianjapedia
Jump to: navigation, search

See Also

Data Attributes, Data Mapping

Input mask type

Available in Form Section and Canvas Section fields and Grid Section columns.

Using the named Input mask types requires a bound data source: a field from a table, or a memory variable (m.memvar) with a default expression to specify the width of the corresponding picture.

Select from the listed options. This will populate the mask as follows:

Type Mask
Custom Not populated.
Currency @C2
Date @D
Email Address @E
Number @F
Text @X
Time @T
Alphabetic @A
Upper Case @!
Upper Case Alphabetic @^

Custom input masks

Mask Description
@C, @C2, @C4 Currency: currency symbol followed by digits 0-9, comma for thousands and one decimal point. @C and @C2 indicate 2 decimal places; @C4 4 decimal places.
@D Date: ISO date YYYY-MM-DD.
@E Email: restricts input that would lead to an invalid email address such as multiple @, leading space, restricted symbols.
@F Number: accepts +/- prefix followed by digits 0-9 and one decimal point.
@X Text: accepts alphanumeric characters a-z, A-Z, digits 0-9 and printable symbols.
@T Time: hh:mm:ss.
@A Alphabetic: accepts alphabetic characters a-z, A-Z only.
@! Upper Case: accepts alphanumeric characters a-z, A-Z, digits 0-9 and printable symbols. Lower case alphabetic characters are converted to upper case.
@^ Upper Case Alphabetic: accepts alphabetic characters a-z, A-Z only. Lower case alphabetic characters are converted to upper case.
@I#,#,# Integer: integer value with maxlength,minvalue,maxvalue: e.g. @I10,100,1000.
@F#,#,# Double: double value with maxlength,maxdecimals,minvalue,maxvalue: e.g. @F10,2,0,10000.
?<regular expression> Regular expression: prefix with '?' to indicate a regular expression. e.g. ?\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b (email address). Detailed information on regular expressions can be found here.
!A9UX VFP-style picture characters: each picture character corresponds to a character in the value, e.g. AAA, !A99.
 ! upper case
A alphabetic
9 numeric
U upper case alphabetic
X alphanumeric.

Data Dictionary: Picture

The Input Mask corresponds to the Picture Column Constraint stored in the table's Data Dictionary.

Modify a Column: Input Mask / Picture


The Picture Column Constraint can be set in the Create a Column and Modify a Column dialogs in the Data Workspace and Page Builder.

It can also be specified in the CREATE TABLE and ALTER TABLE commands.

ALTER TABLE "customers" MODIFY CONSTRAINT CUSTOMERID SET PICTURE "@^"

Inherit dictionary rules

Form Section and Canvas Section controls can 'inherit' the Data Dictionary rules. This populates the control's relevant attributes with the settings from the Data Dictionary.

Section: Inherit dictionary rules



By default, controls have the Inherit dictionary rules attribute set to True, but the containing Form and Canvas Sections have the attribute set to False.

To enable dictionary inheritance for all the controls in a Section, set the Section's attribute to True.


Field: Inherit dictionary rules



The attributes of the controls will be populated with the dictionary settings (save and reload the App).

Inherit dictionary rules can then be disabled for individual controls as required.

Remember, enabling Inherit dictionary rules for the control has no effect unless Inherit dictionary rules for the control's containing Section is enabled.


Placeholder text

Placeholder text



Available in Form Section and Canvas Section fields.

The Placeholder text attribute defines text to be displayed in a field when it is empty.

It is used, along with the input mask and tooltip to assist the user in correct data entry.

The text is displayed 'grayed-out'.

In Canvas Sections, it is shown whenever the control is empty. In Form Sections, it is shown when the control is empty and the Section is in Edit or Add mode.


Password input

Password Input



Available in Form Section and Canvas Section fields.

If the Password input attribute is checked, the data is displayed as asterisk (*) characters as it is entered into the field.

Note: this is only in operation as the data is being entered, so should be used for fields that are cleared after submission.

For an example, please see the example_registrationform App ('Lianja Web UI User Registration Form Demo').

Paging through records in a Form Section will not hide the field contents.


Notes on Client Support

Mask Notes
@C, @C2, @C4 -
@D Currently supported on the Desktop client only.
@E Supported on all clients from v5.0. In earlier versions supported on the Desktop client only.
@F -
@X Currently supported on the Desktop client only.
@T Currently supported on the Desktop client only.
@A Currently supported on the Desktop client only.
@! -
@^ -
@I#,#,# Currently supported on the Desktop client only.
@F#,#,# Currently supported on the Desktop client only.
?<regular expression> Currently supported on the Desktop client only.
!A9X -
Attribute Notes
Placeholder text Currently supported on the Desktop client only.
Password input -