ATTRIBUTE MODIFIERS

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]
” 123″ is printed as “0123”

B Bankers’ format Number is left filled with ‘0’, no commas, no decimal point, and fixed decimal places. B

[amount:B]
” 1,123.45″ is printed as “000112345”

C Remove commas The commas (thousands separators) in a number are removed. C

[amount:C]
” 1,123.45″ is printed as ” 1123.45″

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]
“123.00” is printed as “123 “

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]
“abc
def” is printed as “abc\ndef”.

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]
” 123″ will be displayed as “123 “

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]
” -123″ will be displayed as ” 123-“

MAX Maximum value Print the maximum value from an association or array. Applies to numbers, expressions, and dates. MIN

[lines.amount:MIN]
will display the maximum value of “amount” in the table “lines”.

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]
will display the minimum value of “amount” in the table “lines”.

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]
“Hello ” will be displayed as ” Hello”.

S Script safe Characters known to reserved in scripts are escaped with ‘\’. The current set is: “‘&;\(){}[] S

[text:S]
“hello; world” will be displayed as “hello\; world”

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]
“Fred ” will be displayed as “Fred”

U URL format All spaces are replaced by ‘+’. U

[web:U]
“http://www.x.com/abc def” will be displayed as “http://www.x.com/abc+def”

UPDATE UPDATE
W Change attribute width Display the attribute in a smaller or wider field. W<width>

[name:W5]
“Maximillian” will be displayed as “Maxim”

[name:W10]
“Maxim” will be displayed as “Maxim_____” where “_” are spaces

X XML safe & is replaced by &amp; and < is replaced by &lt; X

[name:X]
“A&B” will be displayed as “A&amp;B”

Z Zero suppress Number fields with a value of 0 are printed as spaces. Z

[amount:Z]
” 0.00″ will be displayed as ” “

+ 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]
” 100.00″ will be displayed as ” AUD100.00″
Note the prefix is added to the field width.

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:,]
“widget” will be displayed as
description,widget

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]
“Maximillian” will be displayed as “milli”

SEE ALSO

dictionary (4) type (4)

Leave a Reply