You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
The following mask types are available in the Blueriq library:
Mask type | Base type | Description |
---|---|---|
AQ_DatePattern | date, dateTime | Applies a date(-time) format with a specific pattern to a date(-time) value. |
AQ_FirstToUpperCase | string | Converts the first character of a string to upper case and the rest of the string to lowercase. |
AQ_NumberPattern | integer, number, currency, percentage | Applies a number format with a specific pattern to an numerical value. |
AQ_OrdinalNumber | integer | Displays an ordinal number for an integer value. |
AQ_RegularExpression | string, number, integer, currency, percentage | Replaces each substring of a string value that matches a given regular expression with the given replacement. |
AQ_RomanInteger | integer | Displays an integer value in roman numerals. |
AQ_SetCase | string | Displays a string value in upper or lower |
AQ_SpelledBoolean | boolean | Displays a boolean value in words. |
AQ_SpelledCurrency | currency | Displays a currency value in words. |
AQ_SpelledDayOfWeek | integer | Displays a weekday in words. |
AQ_SpelledDeltaDate | date, dateTime | Displays the difference between a date and today in words and integers. |
AQ_SpelledInteger | integer | Displays an integer value in words. |
AQ_SpelledMonth | integer | Displays a month in words. |
AQ_SpelledNumber | number | Displays a number value in words. |
AQ_DatePattern
You can use this mask type when you want to create masks that change the way a date or dateTime value is displayed in Blueriq Studio documents.
Parameters
Name | Description | Type | Required |
---|---|---|---|
date pattern | a pattern composed of date pattern options and separators | string | true |
To define your own date mask you must compose a date pattern using the following options:
Supported attribute types
- date
- dateTime
Supported languages
- Dutch
- English
Examples
To display | as | use this pattern |
---|---|---|
12-02-2009 | Thursdat 12 Feb. 09 | dayofweek dd shortmonth yy |
12-02-2009 13:12 | Thursday 1:12 AM | dayofweek h:mm a |
12-02-2009 | 2009 | yyyy |
12-02-2009 | February 12 two thousand and nine | month dd year |
12-02-2009 | 12/02/2009 | dd/MM/yyyy |
AQ_FirstToUpperCase
You can use this mask type to capitalise the first letter of (part of) a string and make the remaining characters lowercase.
Parameters
Name | Description | Type | Required |
---|---|---|---|
start-index | the position of the character you want to make uppercase | string | false |
start-index | the position of the last character to make lowercase | string | false |
Supported attribute types
- string
Examples
To display | as | use this pattern |
---|---|---|
a sTrinG ValUE | A string value | start-index: end-index: |
a sTrinG ValUE | a String value | start-index: 2 end-index: |
a sTrinG ValUE | a String ValUE | start-index: 2 end-index: 7 |
a sTrinG ValUE | A string valuE | start-index: end-index: 12 |
AQ_NumberPattern
You can use this mask type when you want to create masks that change the way a number value is displayed in Blueriq Studio documents.
Parameters
Name | Description | Type | Required |
---|---|---|---|
pattern | a number format pattern
at least one zero at the end of the decimal syntax is required.
| string | true |
prefix | text string that will be displayed in front of the formatted number value | string | false |
postfix | text string that will be displayed behind of the formatted number value | string | false |
zero-fraction | string value that substitutes the fraction part when the fraction is zero | string | false |
The pattern syntax: {options}format;negative-spec;positive-spec
- options
The option set is optional and must be surrounded with {} when used. It represents a key value mechanism separated by ',' signs.
Examples include: a=b,q=e meaning a is set to b and q is set to e.
Valid options are:- locale=nl-NL: This specifies a locale in the option set overriding the one of the NumberFormats' class.
- format
The format pattern which actually specified how the number should look like consists of a decimal part and an fractional part divided by a '.' when a fractional part is required.- decimal
Decimal part specifies how grouping, minimum decimal and maximum decimal digits. For example a pattern: #,##0 specifies at least 1 decimal digit ( which is always the case ) and grouping every 3 decimal digits. With a maximum of 4 decimal digits. At least 1 zero at the end of the decimal syntax is required for the pattern to parse. - fractional
The fractional part begins if there is a decimal separator '.'. If there is no decimal separator there is no fractional part. The fractional part specifies how many minimum fraction digits there are required and how many fraction digits at max are allowed. For example a syntax 0.00## will specify that at least two fractional should be displayed and at most four.
- decimal
- negative-spec
Negative pattern has only 2 special characters: '#' and ';'. The '#' will dictate the actual number pattern specified earlier. For example: 0.0;(#) will specify that a negative number is prefixed with '(' and postfixed with ')' While ';' will end the pattern part and proceed to the positive specification - positive-spec
The positive pattern has only 1 special character: '#'. The '#' will dictate the actual number pattern specified earlier. For example: 0.0;(#) will specify that a negative number is prefixed with '(' and postfixed with ')'
Supported attribute types
- number
- percentage
- currency
- integer
Examples
To display | as | use this pattern |
---|---|---|
500000,00 | 500.000,- | pattern: #,##0.00 zero-fraction: - |
500000,00 | € 500.000,00 | pattern: #,##0.00 prefix: € |
12 | 12,000 % | pattern: #,##0.000 postfix: % |
-180,12 | 180 | pattern: #0;# |
23 | +023,00 | pattern: {locale=NL-nl}000.00;-#;+# |
Note that the comma and dot in the pattern are not taken literally; they are just stand-in symbols for the decimal separator and the grouping separator. The actual symbols used depend on the language (locale). For example, the number 1234567.89 with pattern #,##0.00 results in the following numbers, depending on the language used:
- en-GB (English - United Kingdom): 1,234,567.89 (comma as grouping separator, dot as decimal separator)
- nl-NL (Dutch): 1.234.567,89 (dot as grouping separator comma as decimal separator)
- fr-FR (French): 1 234 567,89 (space as grouping separator, comma as decimal separator)
The locale can also be fixed in the pattern, so that the pattern is no longer locale-sensitive. In case you want to have a space as the grouping separator for the number 1234567.89 you should use the {locale=fr-FR}#,##0.00 as pattern, which will result in 1 234 567,89 no matter what language is used for the rest of the project.
AQ_OrdinalNumber
This mask type is used to display integers in words as ordinal numbers, e.g. “1” will be displayed as “first”.
Parameters
- none
Supported attribute types
- integer
Supported languages
- Dutch
- English
Examples
Displays | as |
---|---|
1 | first |
35 | thirty-fifth |
AQ_RegularExpression
This mask type is used to create special formatting of numbers or strings. The specified regular expression is used to select parts of the input and replace that with the string that you define in the replace parameter.
Parameters
Name | Description | Type | Required |
---|---|---|---|
regexp-search | a pattern that selects parts of the input
the regular expressions used in several Blueriq Studio functions are common Java 1.4 expressions. For a complete documentation we refer to the online java documentation.
| string | true |
replace | a string to replace the selected parts of the input | string | true |
toupper | a boolean value used to apply uppercase before regular expression is evaluated | boolean | false |
tolower | a boolean value used to apply lowercase before regular expression is evaluated | boolean | false |
prefix | a string value that will be added before regular expression is evaluated | string | false |
postfix | a string value that will be added before regular expression is evaluated | string | false |
Supported attribute types
- integer
- number
- percentage
- currency
- string
While parsing a mask of this type the initial input string is transformed in the following order:
- changing the case of the string to upper or to lower case
- adding the prefix
- adding the postfix
- performing the regular expression search
- completing the transformation using the replace string
Examples
To display | as | use these parameters |
---|---|---|
123456789 | 1234-56-789 | regexp-search: 0*([0-9]{4})([0-9]{2})([0-9]{3})$ replace: $1-$2-$3 prefix: 00000000 |
1234aa | 1234 AA | regexp-search: ([0-9]{4})\s*([A-Z]{2})$ replace: $1 $2 toupper: true |
571518833 | 57.15.18.833 | regexp-search: 0*([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{3})$ replace: $1.$2.$3.$4 prefix: 00000000 |
AQ_RomanInteger
This mask type is used to display positive integer values as roman numerals.
Parameters
Name | Description | Type | Required |
---|---|---|---|
case | “upper” for uppercase roman numerals “lower” (default) for lowercase numerals | string | false |
Supported attribute types
- positive integer (0 < integer < 1.000.000)
Examples
To display | as | use this parameter |
---|---|---|
3 | iii | case: lower |
3 | III | case: upper |
AQ_SetCase
This mask type is used to make the characters of the selected part of the string uppercase or lowercase.
Parameters
Name | Description | Type | Required |
---|---|---|---|
case | “upper” to convert the selection to uppercase “lower” (default) to convert the selection to lowercase | string | false |
start-index | the position of the first character you want to select | string | false |
end-index | the position of the last character you want to select | string | false |
Supported attribute types
- string
Examples
To display | as | use these parameters |
---|---|---|
a sTrinG ValUE | a string ValUE | case: lower end-index: 8 |
a sTrinG ValUE | a STRING ValUE | case: upper start-index: 3 end-index: 8 |
AQ_SpelledBoolean
This mask type is used to display a boolean value in words.
Parameters
Name | Description | Type | Required |
---|---|---|---|
short | TRUE for an abbreviated notation FALSE (default) for whole words | boolean | false |
Supported attribute types
- boolean
Supported languages
- Dutch
- English
Examples
To display | as | use these parameters |
---|---|---|
TRUE | Yes | short: FALSE |
TRUE | Y | short: TRUE |
AQ_SpelledCurrency
This mask type is used to display a currency value in words.
Parameters
Name | Description | Type | Required |
---|---|---|---|
spellzerocents | FALSE (default) to omit converting zero decimal values to words TRUE to convert zero decimal values to words | boolean | false |
currency | the type of currency e.g. euro, dollar, pound | string | false |
Supported attribute types
- currency
Supported languages
- Dutch
- English
Examples
To display | as | use this parameters |
---|---|---|
€ 20,- | Twenty euros | currency: euro |
€ 20,- | Twenty euros and zero cents | spellzerocents: true currency: euro |
$ 20,12 | Twenty dollars and twelve cents | currency: dollar |
AQ_SpelledDayOfWeek
This mask type is used to display an integer value that represents a weekday in words.
Parameters
Name | Description | Type | Required |
---|---|---|---|
first-day-of-week | the name of the day that you would want to correspond with 1 options: sunday (=default), monday, tuesday, wednesday, thursday, friday or saturday | string | false |
Supported attribute types
- integer
Supported languages
- Dutch
- English
Examples
To display | as | use this parameter |
---|---|---|
1 | Sunday | first-day-of-week: sunday |
1 | Monday | first-day-of-week: monday |
AQ_SpelledDeltaDate
This mask type is used to display the difference between a date and today in words and integers.
Parameters
- none
Supported attribute types
- date
- dateTime
Supported languages
- Dutch
- English
Examples
Let's go back to 2010-03-26.
Displays | as |
---|---|
2010-03-26 | today |
2010-03-25 | 1 day ago |
2010-02-26 | 1 month ago |
2010-04-26 | in 1 month |
2009-03-26 | 1 year ago |
2010-05-10 | in 1 month and 15 days |
2011-06-19 | in 1 year, 2 months and 24 days |
2012-12-20 | in 2 years, 8 months and 25 days |
AQ_SpelledInteger
This mask type is used to display an integer value in words.
Parameters
- none
Supported attribute types
- integer
Supported languages
- Dutch
- English
- af, ba, bg, ca, cpe, cs, cy, da, de, el, eo, es, et, fa, fi, fr, fy, ga, gd, haw, hi, hu, id, is, it, ja, kl, kn, lisu, lt, ml, ms, ne, pap, pl, pt, qu, ro, ru, si, sk, sl, sm, sq, sr, sus, sv, sw, th, tl, tr, vi, yi, yo, zh (see a list of language names)
Examples
Displays | as |
---|---|
12 | twelve |
25 | twenty five |
AQ_SpelledMonth
This mask type is used to display an integer value representing a month, in words.
Parameters
- none
Supported attribute types
- integer (1..12)
Supported languages
- Dutch
- English
Examples
Displays | as |
---|---|
12 | December |
1 | January |
AQ_SpelledNumber
This mask type displays a number value in words.
Parameters
- none
Supported attribute types
- number
Supported languages
- Dutch
- English
- af, ba, bg, ca, cpe, cs, cy, da, de, el, eo, es, et, fa, fi, fr, fy, ga, gd, haw, hi, hu, id, is, it, ja, kl, kn, lisu, lt, ml, ms, ne, pap, pl, pt, qu, ro, ru, si, sk, sl, sm, sq, sr, sus, sv, sw, th, tl, tr, vi, yi, yo, zh (see a list of language names)
Examples
Displays | as |
---|---|
12,5 | Twelve five tenth |
25,1 | Twenty five one tenth |