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] |
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] |
FRST | 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 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 comes from the 2nd and subsequent lines of the attribute help in the data dictionary. | HELPMSG | In dictionary:date, 8 DC #DATE OF DELIVERY #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] |
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] |
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] |
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 | UPDATE | |||
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)