4D Blog

Home Product 4D Write Pro – More control when using formulas

4D Write Pro – More control when using formulas

August 4, 2020

Product

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.

Discuss

Tags 4D Write Pro, Formula, Programming, v18 R4, v19, Word processor

Latest related posts

  • December 3, 2025

    Give AI to a 30 years old 4D application

  • November 28, 2025

    ORDA – Handle an event-driven logic during database operations

  • November 27, 2025

    ORDA – Permissions – Restrict / allow web access to the resources in one click

Roland Lannuzel
Roland Lannuzel
• Product Owner & 4D Expert • After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy