As a 4D Write Pro user, you’ve most likely used expressions (or more recently, formulas) to automatically fill in certain parts of your documents. These formulas can return “raw” text or images. In the case of text, they may contain line breaks. The question is how should these line breaks be handled when they are processed inside 4D Write Pro documents? This blog post provides the answers … keep reading!
HDI: Manage special characters returned by formulas
Line breaks simply didn’t exist in 4D Write. When a “carriage return” was typed, a new paragraph had to be created. Today, 4D Write Pro gives you two possibilities:
- insert a new line inside an existing paragraph
- create a new paragraph
So what to do if text returned by a formula contains one or more carriage returns? Should they be considered as paragraph breaks or simple line breaks? Until now and in contrast to 4D Write, 4D Write Pro considered them as simple line breaks. As of 4D v18 R4, the choice is yours thanks to a new document property that defines how they should be treated!
If you want carriage returns to be treated as paragraph breaks:
WP SET ATTRIBUTES(WParea;wk break paragraphs in formulas;True)
If you want carriage returns to be treated as line breaks:
WP SET ATTRIBUTES(WParea;wk break paragraphs in formulas;False)
That’s it! It’s as simple as that 🙂
Bonus: You can change your mind at any time. It’s a document property that can be modified according to your needs and those of your customers!
Learn more about this feature on the doc center.