main ← issue-6066
opened 02:08PM - 17 Sep 26 UTC
Fixes #6066
This adds support for **static text** and **field-level display f…ormats** in table formatters.
At long last, you can add text *before* or *after* a given field and define static text entries without using a database field or editing XML.
- Preserve static text when a field is not mapped
- Support field display formats such as `(%s)` and `%s/` by letting the user enter either a text before or text after value.
- Add static text and field format controls to the formatter editor.
- Updates the preview so we can see it both when editing and after running a query
<img width="322" height="377" alt="image" src="https://github.com/user-attachments/assets/698e0149-fc84-4c6e-a711-c0edf3379af8" />
### Checklist
- [x] Self-review the PR after opening it to make sure the changes look good and self-explanatory (or properly documented)
- [x] Add automated tests
### Testing instructions
1. Open the table formatter editor.
2. Select a field and enter text before and/or after the field placeholder.
3. Add a static text row and verify that it remains after saving and re-opening the formatter.
4. Preview records with both populated and empty fields.
5. Run a query and verify the format you defined appears correctly.
6. Export the results to CSV and verify that the format is preserved.
## Summary by CodeRabbit
* **New Features**
* Added support for static text, prefixes, suffixes, separators, and display formats in formatter fields.
* Formatter values can use `%s` and `%d` substitutions for customized output.
* Added separate editors and labels for display formats and field formats.
* Added localized “Display Format” labels across supported languages.
* **Bug Fixes**
* Improved formatting for empty fields and formatters containing only static text.
* Preserved static formatter entries when no mapped field is selected.