Skip to main content

Change the format of existing Text, Integer, and DateTime data types to compatible formats+ 2 “new” formats.

Headshot of article author Nathan Helgren

Note: These changes are available in many regions now, and will be available in Europe by 9/20 and in North America by 9/27.

It can be challenging to pick the right data type. You may start with a text field to store your email addresses and then later realize there is an Email type.  Maybe you picked DateTime when really you only needed Date. until now, you needed to create a new column and then move all of your data over yourself, which could be tedious at best or restrictive in the wort case.

A new API has been made public that will allow users to change the format of a Text, Integer, or DateTime data type to any of the compatible formats for the type (UI functionality will be available in the fullness of time). This will not make any changes to the data of these columns, it will simply instruct the client to display the content in the selected format.

Examples of how the format changes the behavior of the data can be easily seen for the Text data type. Text in Dataverse is a data type that can store a max of 4000 characters. Text has multiple formats that instruct the UI to treat it differently. Email is a text format tells the client to treat the contents of the field as an email. It can display the data as a link that, when clicked, launches your default email client and inserts the address in the To: field.

Some of the compatible formats for each type include:

  • Text: text, textarea, phone, email, URL, ticker, phone, json, richtext
  • Multiline Text: text, textarea, json, richtext
  • Integer: integer, duration, timezone, language, locale
  • DateTime: datetime, date

As you may have noticed, we also have two “new” formats! These formats have been available previously to Microsoft groups who have used them in our first party solutions, and now they are becoming available to you.

Json will store text strings in a json format. Please note, the format will not perform any validations on the correctness of the json. It simply allows you to store, view, and retrieve the content with json markup. This is currently limited for use on non-SQL tables (like Data Lake).

Richtext will allow the use of markup tags to format your text when viewed in a compatible control. Some of our available controls and forms already have this built in, like the email form in activities. By setting this value you can enable richtext for any other text or multiline text column. A control is coming soon in the Canvas and Model Driven space that will be used whenever a column indicates it is richtext.

Using these two new formats will require setting a formatname metadata value, which while not new, was previously underutilized. The documentation provided online will provide an overview of this new value.

The following documentation will provide a detailed look into how to make the changes and additional context: Data type format conversions (Microsoft Dataverse) – Power Apps | Microsoft Docs

Want to learn more about Dataverse in video format? Be sure and check out the Dataverse video series on the community:  https://aka.ms/DataverseVideos