- Introduction to WorkXpress
- Building Your Application
- Examples and Best Practices
- Technical Manual
The selected file /tmp/fileruRRIw could not be uploaded, because the destination sites/default/files/css/css_a91cd284035e73ba34d112bfed2f5a16.css is not properly configured. The selected file /tmp/fileS61iJV could not be uploaded, because the destination sites/default/files/css/css_de1aa27776f1462d2b0d83a80ce4b92d.css is not properly configured.
The currency Field stores a monetary value. It works much like a number Field but has been slightly modified. For instance, a currency Field will never show the value 34.2. Instead, it will show $34.20.
By default, the length of the currency Field is set to 10 em and the maximum length is set to 18 characters. These settings can be changed in the Length and Height Settings tab of the Block Editor.
The currency Field accepts the same input as any number Field. All numerical characters are allowed as well as one decimal. Any other characters will cause the currency Field to fail validation. Since the Field accepts only numbers, and no other characters (including dollar signs), the expression for defaulting a currency Field should result in a number with no symbols. Thus if defaulting a currency Field to the value of another currency Field, the “Number Only” output format should be used.
The currency Field has two different output formats:
The currency Field's internally stored number can be filtered by any of the eight standard number-type filters.
In view mode, if a value is stored in a currency Field, it will show a dollar sign followed by the internally stored number, but if no value is stored, it shows nothing. In add or edit mode, a dollar sign is shown in front of a number Field.
Working with currencies in the expression builder generally requires that the Number Only output format be used. Since currency Fields only accept numbers as input, the expression which is to fill in a currency Field must result in a number. Also, performing mathematical operations with currencies requires the use of the arithmetic operator += followed by the expression enclosed in parentheses. Thus if I desired to add the values stored in the Fields Currency1 (associated with the Item1 Item Type) and Currency2 (associated with the Item2 Item Type), the expression I would need to use is: +=(${Item1 - Currency1 (Number Only)} + ${Item2 - Currency2 (Number Only)}) Of course, the two currency Fields would need to be selected using the Query Builder, at which point the two expressions used in the above expression would be available as content in the Expression Builder.