4D Blog

Home Product NULL value to blank value? No more default mapping

NULL value to blank value? No more default mapping

January 13, 2022

Product

When you create a new field in your database, 4D allows you to choose to map NULL value to blank values or not. Starting from 4D v19 R4, in new projects, 4D will no longer by default map the NULL value to an empty value.

Quick history recap: older versions of 4D (before 4D v11 was introduced) did not support NULL. Not in the database nor in the language.

Starting with 4D v11, databases supported NULL, as well as 4D’s SQL language, but not the 4D language. For this precise reason, by default, the option “map NULL value to blank values” was pre-selected for newly created fields. It made coding with 4D’s language way easier.

Back to the present day, and with ORDA, it is a different story. ORDA is fully aware of NULL and using the concept of NULL opens a lot of possibilities in your code.

NULL is used to mark absent data. Even if mapping NULL with an empty value can seem logical, it is really not the same. For example, if a user enters a 0 or never entered anything, it might be a major difference for you! NULL tells you that no value was ever entered.

ORDA is designed to work with NULL values. For example the .count() function returns the number of entities in the entity selection with a non-null value. With ORDA it is a much better practice to keep the support of NULL, and thus avoid mapping it to an empty value.

For example, if you need to count how many of your clients have entered a mobile phone number in their description, if the “mobile” field of your table support Null value, just write:

$count:=ds.Users.all().count("mobile")

Whenever you need to map a NULL value to a blank value, you still can use the option Map NULL values to blank values in the field properties:

As ORDA became the standard way to work with 4D, it is now time to change the default value for this option. Starting a project with 4D v19 R4, this option is not set by default anymore for newly created fields – but of course, you can still enable it if needed!

Discuss

Tags ORDA, v19 R4, v20

Latest related posts

  • February 3, 2026

    4D Write Pro – Adding a margin automatically when bullets are set using standard actions

  • January 22, 2026

    Transform Static Documents into Actionable Knowledge with AIKit

  • January 22, 2026

    Deploy Fluent UI effortlessly in your 4D applications

Fabrice Mainguené
Fabrice Mainguené
• Product Owner •Fabrice Mainguené joined 4D Program team in November, 2016. As a Product Owner, he is in charge of writing the user stories then translating it to functional specifications. His role is also to make sure that the feature implementation delivered is meeting the customer need.After obtaining a Bachelor degree in Computer Science at CNAM, Fabrice joined a small software publishing company as a Windev developer. Then he worked for different companies in industry and trade areas as a Windev and web developer as well as technical advisor on new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • Release infos
  • 4D View Pro
  • 4D Write Pro
  • Email, Microsoft 365, Gmail
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • 4D Qodly Pro
  • 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 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Google 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 vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Google 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 vscode Web Word processor
Subscribe to 4D Newsletter

© 2026 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