Back

Use Data Validation type on Master Data Information to ensure specific field types

Additional features
Video 1/5
Play
Close
  • Helpful
  • Not helpful
  • Needs update
  • Technical error
An intermediate video requires some previous experience with Business Central, but it is still easily accessible to most people. Intermediate Watch "the details", if you need detailed knowledge about a specific topic. These videos are only relevant for particular users. The Details This video includes functionality from the app "Master Data Information" which is available at Microsoft AppSource. Click to visit AppSource. Master Data Information

Playlists  Manage

Log in to create a playlist or see your existing playlists.

Presenter: Sune Lohse, Chief Strategy Officer

With the field data validation type on the information code, you can ensure that users can only enter data that is interpreted as specific data types.

The field data validation type on the information code in Business Central lets you control what users can enter into information code fields. You set a validation data type such as decimal, integer, date, Boolean, or date formula, and Business Central rejects any entry that does not match that type.

If you set an information code to decimal, a user cannot enter free text in that field. Business Central shows an error and explains that the value must be a decimal.

You need to account for the regional format on each user’s setup. The same value can be interpreted differently depending on whether the format is US, Danish, or another regional setting. This matters most for decimals with comma separators and for date fields.

Date values are stored as text behind the scenes, so the displayed format depends on the regional settings. A date entered in a US database displays differently than the same date in a database using another format.

What the field data validation type does on the information code

On the information code list, each code has a validation data type. You can choose from several options: decimal (numbers with comma separators), integer (whole numbers only), date, date formula, Boolean, and date time.

By setting a validation data type, you force the information stored on the master data through those information codes to follow a specific type. For example, you can set a “wheel” information code to decimal and a “last service date” information code to date. From then on, anyone entering data on those codes has to comply with the chosen type.

How validation works in practice

Say you have an item with a specification set up for a wheel diameter. The current value is 29. You can change it to 28, and you can even include a description like “28 inches” in the right field.

But if you try to enter “28 inches” directly in the field that is set up as a decimal, Business Central blocks it. You get an error explaining that the validation data type is decimal, so the value has to be something that can be read as a decimal number.

Watch out for regional formats and separators

The regional format you use needs to match what you enter. If your regional format is US and you type “28,2”, the system removes the comma. If you type “28.2”, it keeps the decimal as expected.

So everyone working in the system needs to be aware of the format in use, or at least be aware that the format affects how values are interpreted. This is especially important for date fields set up as a date formula.

If you use a different date logic, for instance the standard Business Central shortcut where you type “T” for today, the displayed date follows the regional format. The 4th of May would show one way in a US database and as “05.04” in a database using a different date format.

Because dates are interpreted as text underneath, you need to keep these differences in mind when several users work across different regional settings.

Q&A

What data types can you set with the field data validation type on the information code?

You can choose decimal (numbers with comma separators), integer (whole numbers only), date, date formula, Boolean, and date time.

What happens if a user enters the wrong type of value in a field with a validation data type?

Business Central shows an error. For example, if the field is set to decimal and the user enters text, the system explains that the value must be a decimal and rejects the entry.

Why does the regional format matter when using validation data types?

The regional format affects how values are interpreted. A decimal typed with a comma can be handled differently in a US format than in another format, and dates display differently depending on the regional settings because they are stored as text behind the scenes.

939474465-L3o-L9VB7KY-ENG24032871