Initial Value

The Value property is used to specify the initial value for an attribute.

Different initial value can be specified for each language translation associated with the attribute. Each value can be edited either from the Translations tab or by selecting the language from the Session Language drop-down list and editing the value property of an attribute.

Initial value must confirm to the following rules:

The initial values associated with an attribute for the different language translations can be validated by using validate option in the attribute level.

In the Painter, the Value property of a field specifies its default value that gets loaded into the field when the host sends a blank value.

Note: The value of this property is displayed in the Painter and Debugger screens. This helps to visualize the look and feel of the form with representative data shown in the associated fields. So, the Value property is applicable only for Winforms and not for CE clients.

Examples of Initial Value

Example 1: When the attribute is of data type Number

Valid:

123
1.23    (Decimal property set to 2)

 

Invalid:

+123   (Number must be unsigned)
1.2     (Decimal property set to 0)
1.234  (Decimal property set to 2)
1+2    (Arithmetic expression in the initial value)
1a2     (Alpha numeric in the initial value)

Example 2: When the attribute is of data type SignedNumber

Valid:

+123
-1.23   (Decimal property set to 2)

Invalid:

1+23   (Arithmetic expression in the initial value)
1a2     (Alpha numeric in the initial value)

Example 3: When the attribute is of data type Boolean

Valid:

True
False
Yes
No
Y
N

Invalid:

123     (Incompatible)
Abc     (Incompatible)
1a2     (Incompatible)

Example 4: When the attribute is of data type String

Valid:

123
\\abc
\”1+2
“”12a

Invalid:

\123    (Backslash must be escaped)
“abc”   (Double-quote must be escaped)
1”a2    (Double-quote must be escaped)

Example 5: When the attribute is of data type Date

Valid:

12122012
01021999
17011986

Invalid:

11Jan2016     (Incompatible)
Jan112009     (Incompatible)