NAME
type – UNIBASE attribute modifiers
DESCRIPTION
UNIBASE attributes have default display properties. This lists modifiers that are used to change the default behaviour.
Modifiers are included in the attribute reference and separated from the attribute name by a ‘:’.
eg [name:T]
Each description is followed by one or more examples.
+<suffix>{:}EXAMPLE[amount:-%]
” 100.00″ will be displayed as ” 100.00%”
Note the suffix is added to the field width.
CODE | TITLE | DESCRIPTION | SYNTAX | EXAMPLE |
---|---|---|---|---|
A | Ascii fill | Left (or right) fill the attribute with the next character. | A<fill character> |
[units:A0] |
B | Bankers’ format | Number is left filled with ‘0’, no commas, no decimal point, and fixed decimal places. | B |
[amount:B] |
C | Remove commas | The commas (thousands separators) in a number are removed. | C |
[amount:C] |
CSV | CSV format | Formats attribute suitable for CSV | CSV | [description:CSV] printed as “product name”
[price:CSV] printed as 50.00 |
D | Suppress decimal 0 | If the decimal part of a number is all 0, then it is not printed. | D |
[amount:D] |
E | Escape control characters | Whitespace control characters are escaped. This is particularly useful if the output of a command is put into a union field. | E |
[text:E] |
EMPTY | Trim field in only if it is empty | If the field is empty then there is no output. If the field is not empty then the field contents including trailing spaces etc is dispalyed | EMPTY | [text:EMPTY] |
F | Free format | There isn’t a default decimal places for a number. Used for input, this only has decimal places if a decimal point is typed. | F |
[count:F] |
FIRST | Value from first record | Value from first record in association | FIRST | [sales.amount:FRST] |
HELPLINE | Line of help | Single line help message. This comes from the first line of the attribute help in the data dictionary. | HELPLINE | In dictionary:date, 8 DC #DATE OF DELIVERY #Date goods were delivered. # #NB This is not the invoice date.[date:HELPLINE] will display:DATE OF DELIVERY |
HELPMSG | Long help message | Extensive help message. This is the full help message in the data dictionary. | HELPMSG | In dictionary:date, 8 DC #DATE OF DELIVERY #Date goods were delivered. # #NB This is not the invoice date.[date:HELPMSG] will display:DATE OF DELIVERY Date goods were delivered.NB This is not the invoice date. |
I | Invisible input. | Used for input (particularly for passwords). Any character typed is displayed as a ‘*’. | I |
[password:I] |
INPUT | Data input field | Output an “INPUT” or similar HTML input element for editing and saving the edited changes to the attribute. | INPUT |
[units:INPUT] |
J | Join character | Join array elements with <join char> | J<join char> | [address:J,] |
JSON | Make field value suitable for JSON | Any JSON special characters are escaped | JSON | [name:JSON] |
L | Left justify | Left justify a number. Normally numbers are right justified. | L |
[amount:L] |
LAST | Last value | Value from last record in association | LAST |
[sales.amount:LAST] |
LENGTH | Length of text in field | Display number of characters in field after trimming leading and trailing spaces. | LENGTH | [name:LENGTH] |
LIVE | Output field for live editing | Output html code compatible with the “ub-live-edit” custom element | LIVE | [name:LIVE] |
LOWER | Convert field text to lower case | Field as lower case | LOWER | [name:LOWER] |
M | Trailing minus | For negative numbers, the minus sign is printed after the number. | M |
[amount:M] |
MAX | Maximum value | Print the maximum value from an association or array. Applies to numbers, expressions, and dates. | MIN |
[lines.amount:MIN] |
MEAN | Mean value | Mean value of attribute in associated records or mean value of an array | MEAN |
[sales.amount:MEAN] |
MIN | Minimum value | Print the minimum value from an association or array. Applies to numbers, expressions, and dates. | MIN |
[lines.amount:MIN] |
N | No sum | If the attribute is a number it won’t be summed at subtotals. | N |
[amount:N] |
P | POS input | POS (Point of sale) data entry for numbers. The attribute fills from the right (rather than to the left of the decimal point). | P |
[amount:P] |
R | Right justify | Right justify test. Normally text is left justified. | R |
[comment:R] |
REMOVE | Remove string for field | Remove all occurrences of a string from a field. String is terminated by ‘:’ or end of field. | REMOVE<string>: | [mobile:REMOVE ] [address:REMOVEStreet] |
S | Script safe | Characters known to reserved in scripts are escaped with ‘\’. The current set is: “‘&;\(){}[] | S |
[text:S] |
SDEV | Standard Deviation | Standard deviation of attribute in associated records or standard deviation of an array. | SDEV |
[sales.amount:SDEV] |
T | Trim value | Trailing spaces (text), leading spaces (numbers), leading 0 (counters and sequences) are removed. This can be used in conjunction with most other modifiers. | T |
[name:T] |
U | URL format | All spaces are replaced by ‘+’. | U |
[web:U] |
UPDATE | ubtransaction update format | XML output used for updating a value in ubtransaction | UPDATE | [description:UPDATE] |
UPPER | Upper case | Convert field text to upper case | UPPER | [name:UPPER] |
W | Change attribute width | Display the attribute in a smaller or wider field. | W<width> |
[name:W5] [name:W10] |
X | XML safe | & is replaced by & and < is replaced by < | X |
[name:X] |
Z | Zero suppress | Number fields with a value of 0 are printed as spaces. | Z |
[amount:Z] |
+ | prefix | Add a prefix to a field. The prefix can be several characters and can be terminated by a ‘:’ if other modifiers are being used. | +<prefix>{:} |
[amount:+AUD] |
– | suffix | Add a suffix to a field. The suffix can be several characters and can be terminated by a ‘:’ if other modifiers are being used. | ||
, | attribute | Display field in attribute format – <name>,<value><line feed>. | , |
[description:,] To use in ubdump to get attribute formats: ubdump -a ‘[description:,]>’ stock |
Number range | Display a subfield | The part of the field specified by the subrange is displayed. | <start>-<end> |
[name:5-10] |
SEE ALSO
dictionary (4) type (4)