Filters can be used to modify the output of the answers to questions.
Consider the following question:
Data Table Question: What is the employee's annual salary?
ID: salary
Answer: $60,000
The number is saved in the Rally database as unformatted. If you create the following template:
${salary}
The output will be: $60000
To format the output as a currency, use the 'currency' filter:
${salary | currency}.
The output will be: $60,000.00
Other filters you may use include:
- uppercase: transforms a phrase to all uppercase letters
- {ID | uppercase}
- lowercase: transforms a phrase to all lowercase letters
- {ID | lowercase}
- commas: formats a number to include comma thousands separators
- {ID | commas}
- numberToWords: converts a number to English words
- {ID | numberToWords}
- currency: formats a number to be fixed at 2 decimal places and include comma thousands separators
- {ID | currency}
- currencyToWords: formats a number to be fixed at 2 decimal places and then converts the number to English words featuring 'dollars' and 'cents'
- {ID | currencyToWords}
- {ID | currencyToWords}
- todaysDate: transforms any variable to become the date on which the document was generated
- {any | todaysDate} = mm, dd, yyyy
- Date formats: Using January 14th, 2022 as the example
- {ID | dashedShort} = mm-dd-yy --> 01-14-22
- {ID | dashedLong} = mm-dd-yyyy --> 01-14-2022
- {ID | dotted} = mm.dd.yy --> 01.14.22
- {ID | formal} = dth day of mmmm, yyyy --> 14th day of January, 2022
- {ID | day} = dth --> 14th
- {ID | month} = mmmm --> January
- {ID | splitDate:'day'} = dd --> 14
- {ID | splitDate:'month'} = mm --> 01
- {ID | splitDate:'year'} = yyyy --> 2022
- checkBox: If you are looking to display a check box in front of a multi-select option on your document, you can enter the multi-select field ID and the specific multi-select option field ID along with the filter.
- {fieldID.optionID | checkBox}
- NOTE: the word checkBox needs to be written out with a capital B, if you use checkbox it will not work, it must be checkBox
- {fieldID.optionID | checkBox}
Multi-Select Question Example:
- Question: "Please check off which appliances are included in the sale"
- ID: appliances
- Options: stove, fridge
Encoding:
- {appliances.stove | checkBox} Stove
- {appliances.fridge | checkBox} Fridge
Output:
- Multiple Filters: If you wanted to use the currencyToWords and have those words be capitalized, the filter would look like this:
- {ID | currencyToWords | uppercase}
If you are looking for a filter that is not represented above, get in touch!