How to Set Autonumber for Primary Name Column in Dataverse?

When working with custom tables in Dataverse, the Primary Name column is often set as a required text field. But entering values like TKT-1000, REQ-2025-001, or INV-000123 manually can be repetitive and prone to errors.

Dataverse now allows you to change the Primary Name column to Autonumber, letting the system generate unique, consistent values automatically. This not only saves time but also ensures data accuracy across your environment.

In this Dataverse tutorial, I’ll show you what you need to know about using Autonumber in the Primary Name column, including different Autonumber types such as:

  • String Prefixed Number
  • Date Prefixed Number
  • Custom Format

Primary column is in Dataverse

When you create a new table in Dataverse, it automatically includes a Primary Name column. This column acts as the main display field for each record. It’s what users see in lookups, views, and form headers.

For example:

  • In a Contacts table, the Primary Name might be Full Name.
  • In a Projects table, it could be Project Title.

By default, this column is a Single line of text, and it’s required for every record. That means you must manually type a value unless you automate it.

Now, we can change the Primary Name column to Autonumber, allowing Dataverse to generate unique values, such as TKT-0001, REQ-2025-001, or INV-000123, automatically.

Create a Table in Dataverse

Change the Dataverse Primary Name Column to Autonumber

Let’s say you created a custom Dataverse table called “Support Tickets”. When the table was created, Dataverse automatically added a Primary Name column named “Ticket ID” (which is a required single-line of text column).

Set Autonumber for Primary Name Column in Dataverse

Now, you want to change this Support Ticket column from a text field to an Autonumber, so that the system automatically generates values like:

TKT-1000  
TKT-1001  
TKT-1002  
  1. Open Power Apps and go to the Tables section to open Dataverse. Click on your table: Support Tickets.
Change Primary Name Column to Autonumber in Dataverse
  1. Click the Ticket ID drop-down, then click the Edit column.
Dataverse Autonumber for Primary Column
  1. Change the Data type from Text to Autonumber.
How to Use Autonumber in Dataverse Primary Name
  1. Set the Autonumber Settings:
    • Autonumber type: String prefixed number
    • Prefix: TKT
    • Minimum number of digits: 4
    • Seed value: 1000
    • This will generate values like TKT-1000, TKT-1001, and so on.
Make Primary Name Column Autonumber in Dataverse
SettingDescription
Autonumber typeThis defines the style of the automatically generated number.

We selected a string-prefixed number, which means a fixed text string (like TKT-) is added before the number.
PrefixThis is the text that will appear before the number in every record.

For example, using TKT- helps identify the record as a “Ticket”. You can change this to something like REQ-, INV-, or any custom code based on your needs.
Minimum number of digitsThis sets the number of digits used in the numeric part of the ID.

If you enter 4 The system will generate numbers like 1000, 1001, …, and add leading zeros if needed.

If the number is 5, you’ll get values like TKT-01000, TKT-01001.
Seed valueThis defines the starting number for the sequence.

Setting it to 1000 means the first generated value will be TKT-1000, and the next will be TKT-1001, and so on.

You can use any number here, 1, 500, 2025, etc., depending on how you want your sequence to start.
  1. If the Required property is set to Business Required, change it to Optional or Recommended to allow auto-generation. Click Save.
Primary Column Autonumber Dataverse Tutorial

When you add the data to the table, you can see that the Ticket ID will automatically be generated.

Enable Autonumber for Primary Field in Dataverse

This way, you can change the primary name column to an autonumber in Dataverse.

Check Out: Add Copilot Studio Knowledge Files Using Power Automate

Autonumber Type Date Prefixed Number in Dataverse

Another useful format is the Date prefixed number, which adds the current date (in yyyyMMdd format) before the numeric sequence. This is especially helpful when you want to:

  • Track when a record was created
  • Group records by date
  • Ensure the number resets or progresses with time

Let’s see how to do:

For this example, I am using the same table and the same column (Ticket ID)

  1. Change data type to Autonumber
  2. Select Autonumber type to Date prefixed number
  3. Date format 2025-28-07
  4. Minimum number of digits 4
  5. Seed value 1000
Dataverse Primary Field Autonumber Example
  1. Save the column

Once configured, your values will look like:

Configure Autonumber on Dataverse Primary Column

Note:

If the format doesn’t allow exact date customization (yyyy-dd-MM), and you must have this format, use the Custom Autonumber type instead with a Power Automate workaround or {DATETIMEUTC} formatting.

Learn: Create a Multi-Agent in Copilot Studio

Custom Autonumber Format in Dataverse

Let’s continue with the same example using the Support Tickets table and the Ticket ID column.

I want the system to generate IDs in a custom format like:

TKT-{DATETIMEUTC:yyyyddMM}- {SEQNUM:4}

This gives values like:

TKT-20250728-1000

TKT-20250728-1001

TKT-20250728-1002

Steps to Set Custom Autonumber Format:

  1. Go to Power Apps -> Click Tables. Choose your table (Support Tickets). Click on the column name Ticket ID. Click Edit column to modify it.
Create Autonumber Column in Dataverse Table
  1. Change the Data type from Text to Autonumber. Select Custom from the Autonumber type dropdown.
Dataverse Autonumber Column for Unique IDs
  1. In the Custom format string, enter:
TKT-{DATETIMEUTC:yyyyddMM}- {SEQNUM:4}

Where:

  • TKT- – Static prefix to identify it’s a ticket.
  • {yyyyMMdd} – Inserts the current date (e.g., 20250728).
  • {SEQNUM:4} – Adds a sequential number with at least 4 digits (e.g., 1000, 1001).
Autonumber Field Configuration in Dataverse
  1. Set the Seed value to 1000 if you want the sequence to begin from 1000.
  2. If the column is set to Business Required, change it to Optional or Recommended.
  3. Click Save.
Create Sequential ID with Dataverse Autonumber

Example Output:

After setup, adding new records will automatically generate Ticket IDs like:

Dataverse Autonumber Setup for Primary Column

By changing the Primary Name column to Autonumber, you enable Dataverse to generate unique identifiers for your records automatically.

You can choose from multiple Autonumber formats depending on your needs:

  • Use String prefixed numbers like TKT-1000
  • Add date-based prefixes for tracking and grouping
  • Or go fully custom with formats like TKT-20250728-1001

Additionally, you may find the following Dataverse interesting tutorials:

2 thoughts on “How to Set Autonumber for Primary Name Column in Dataverse?”

Leave a Comment

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App