Parameter Formats
When you define a parameter in the Parameters tab of the Process Definition editing pop-up window, there is a Process Format field in the detail view. You can use this field to control how the parameter's values are displayed. Note that this does NOT affect the values themselves; only how they are displayed.
There are different formats available for different types of parameters.
Dates
Dates use an extended implementation of DateTimeFormatter. You can specify a locale in curly braces. For example, "{de} dd. mmm, yyyy"
, displays the date in the German (de
) locale. You can specify the Olson timezone using i
.
For example, these formats display the date in the Spanish and German locales.
"{es}dd MM yyyy" // 06 04 2013
"{de}dd MM yyyy HH:mm:ss:SSS i" // 06 05 2013 16:53:38:200 Europe/London
See Simple Date Format for syntax and examples.
Note: Date formatting can also be used with RedwoodScript as long as the type is DateTimeZone
.
Numbers
#
: Single whole number digit. If there is no digit at this position in a number, nothing is displayed at this position.0
: Single whole number digit. If there is no digit at this position in a number, a zero is displayed at this position.d
: Single decimal digit. If there is no digit at this position in a number, nothing is displayed at this position.D
: Single decimal digit. If there is no digit at this position in a number, a zero is displayed at this position.,
: Decimal or group separator..
: Decimal or group separator.- ``: Group separator
*
: Preserve the value range, and do not limit to the number of specified digits.
Valid Examples
[[format, value, output]
"#", null, null
"#", "1234", "4"
"*#", "1234", "1234"
"#*", "1234", "1234"
"####", "1234", "1234"
"#,###", "1234", "1,234"
"#,###.DD", "1234", "1,234.00"
"#,###.DD", "1234.56", "1,234.56"
"#,###.DD", "1234.56", "1,234.56"
"*#,###.DD", "123456.78", "123,456.78"
"###.###,DD", "123456.78", "123.456,78"
"0000", "1", "0001"
"000#", "1", "001"
"0,000.DDD", "1", "0,001.000" // No optional position
"#.##.##.##,dd", "1234", "12.34" // No default group size
"#,##.dd", "1234.56", "234.56"
"####", "1", "1"
"##.dd", "12", "12"
"##.dd", "12.34", "12.34"
"# ###", "1234", "1 234"
"#", "-1", "-1"
"#.Dd", "1", "1.0"
"*000", "1", "001"
"#.D*", "123.456", "3.456"
"*#.D", "123.456", "123.4"
"*#.D*", "123.456", "123.456"
Invalid Examples
null
"any invalid string"
"1234"
"#,D###.DD" // decimal position
"###,## ###" // distinct group separator
"#,##,###.DD" // distinct group size
"#*#" // preserve range must be first and/or last
"#0" // leading zero must be first
"#.dD" // optional decimal must be last
"#D" // no decimal separator
String
U
: Single character, upper-case.L
: Single character, lower-case.*
: Repeat last format character until value ends.
Valid Examples
[[formatmask, value, output]
"U*", null, null
"UU", "Aap", "AA");
"U*", "Aap", "AAP");
"L", "Aap", "a");
"UL*", "aap", "Aap");
"L*", "AAP", "aap");
"U*", "aap", "AAP");
Invalid Examples
"U*L" // repeat must be last
File
FileParameter
: Allows a File parameter value to be used as a FileParameter object in RedwoodScript.