As with ConfiForms app for creating forms in Confluence you can have different ways of showing your data, and also transforming your data the way you need it.
For example, assume we want to show the value of the field "myfield" in upper case and want to show only the first 3 symbols of it's value
myfield.upperCase.trunc(3)
In AssetForms we support the following virtual functions which you can use with your field's values and chain, if necessary.
Function |
Description |
---|---|
barcode(barcodeType) |
Generates barcode of requested type from the value. barcodeType can have the following types:
|
base64 |
Returns bas64 encoded string of the value |
formatNumber(PATTERN) |
Attempts to format the value using either default (when PATTERN parameter is left empty) or given formatting PATTERN Expected format: If value could not be formatted according to given format then value will be returned as is |
length |
Returns size of a collection for multi-value field or a number of chars for other types |
lowerCase |
Returns a lowercases value for the field |
matches(REG_EXP_PATTERN) |
Returns true if field's value matches given regular expression pattern REG_EXP_PATTERN And returns false otherwise In conditions it is easy to check if the given value matches the pattern: myfield.matches(REG_EXP_PATTERN):true Or more advanced example with checking for (non) empty value: !myfield:[empty] AND myfield.matches(REG_EXP_PATTERN):true |
qrcode |
Creates QR code from the given value. It is expected that you generate the QR code for the value containing URL |
trim(n) |
Trims the value, Skips "n" first symbols |
trunc(n) |
Truncates the value. Leaves "n" first symbols |
upperCase |
Returns a uppercased value for the field |