Calculates a value to be used as the value of this field, but only if the field does not already have a non-null value. Default is essentially the same as Derivation, except that the value applies only if the current value is non-null. Default expressions are calculated when:
the form is first loaded
data is retrieved from one or more resources
the form is recalculated or saved until the field value is non-null.
Example
This example shows a field definition that uses string manipulation expressions to return a default account ID composed of the first initial of the first name plus the user’s last name.
<Field name=’waveset.accountId’>
<Display class=’Text’>
<Property name=’title’ value=’AccountID’/>
</Display>
<Default>
<concat>
<substr>
<ref>accounts[AD].firstname</ref>
<i>0</i>
<i>1</i>
<ref>accounts[AD].lastname</ref>
</substr>
</concat>
</Default>
</Field>
|