You built a Dataverse table, and now everyone types loan numbers by hand into the primary column. Some say LOAN-7, some say loan 7, and nobody knows which number comes next.
In this tutorial, we’ll set up a Dataverse primary column autonumber on a real Asset Loan table, explain why you can’t swap the primary column for another one, and show the three autonumber types with the gotchas we hit while testing.
Quick answer: You can’t make a different column the primary column after a table exists. You can rename it and change its data type. In Power Apps, open Tables > your table > Columns, open the primary column’s … menu, select Edit, set Data type to Autonumber, pick a format and save.
What You Need Before You Start
- A Power Platform environment with Dataverse and the System Customizer role (or higher).
- A custom table. We use Asset Loan, whose primary column is Loan Number. New to tables? Start with how to create a Dataverse table.
- Power Apps at make.powerapps.com. The classic solution explorer can’t create or manage autonumber columns.
Primary Column vs Primary Key: What’s the Difference?
Every Dataverse table has two special columns. The primary key is a GUID that Dataverse creates for each row, such as cr85a_assetloanid. You never edit it. If Dataverse itself is new to you, read what Microsoft Dataverse is and how it stores data.
The primary name column (Power Apps just calls it the primary column) is the text people see in lookups, views and form headers. An “autonumber primary key” really means an autonumber primary name column; the key stays a GUID.
Can You Change the Primary Column in Dataverse?
Not to a different column. No column menu on our tables has a “set as primary column” command. The primary column is chosen when the table is created. That’s why our Power Apps apps that read Dataverse data always show the same column in lookups.
What you can change: the display name (the schema name stays as it was) and the data type, but only between Plain text and Autonumber.
Step 1: Open the Primary Column
Go to make.powerapps.com, pick your environment, select Tables, open your table, and select Columns. The primary column has a Primary name column tag. Select its … menu and then Edit. More table how-tos are on our Power Apps tutorials hub.

Step 2: Change the Data Type to Autonumber
In the Edit column panel, open Data type. On a primary column, the list offers only Plain text and Autonumber.

Choose Autonumber. Required switches to Optional, because Dataverse fills the value when the row is saved.
Step 3: Pick an Autonumber Type
Open Autonumber type. You get three options:

String prefixed number is the default: a prefix, a minimum number of digits and a seed value. Here’s the gotcha we hit: it adds its own hyphen. Typing LOAN- as the prefix gave a preview of LOAN–00001.

So type the prefix without the hyphen. With prefix LOAN, 5 digits and seed 1, the preview reads LOAN-00001, LOAN-00002, LOAN-00003.

Date prefixed number puts the date the row was created, in UTC, before the number. You pick the date format from a list.
Custom lets you write the whole format. On our Asset table we used this format with seed 1000, and the preview showed ASSET-1000, ASSET-1001 and ASSET-1002:
ASSET-{SEQNUM:4}

The + Append menu adds a sequential number, a datetime or a random string. All three together:
LOAN-{DATETIMEUTC:yyyyMMdd}-{SEQNUM:4}-{RANDSTRING:3}
Step 4: Save and Test New Rows
Select Save (ours took about 20 seconds), then add rows and check the grid:

- The two rows typed earlier kept their text (“Laptop for Megan Bowen”, “Projector for Town Hall”). Nothing is backfilled.
- New rows saved without a value got LOAN-00001, LOAN-00002 and LOAN-00003.
- A row saved with the value MANUAL-7 kept it, and it didn’t use up a number.
So apps and flows simply leave the column out. That applies when you add data to a Dataverse table from Power Apps and when you add a new Dataverse row with Power Automate.

Dataverse Autonumber Cheat Sheet
| Setting or placeholder | What it does | Example |
|---|---|---|
| String prefixed number | Prefix + hyphen + number | LOAN-00001 |
| Date prefixed number | Creation date (UTC) + number | Date format from a list |
| {SEQNUM:n} | Sequential number, at least n digits; grows past n | {SEQNUM:4} -> 1000 |
| {RANDSTRING:n} | Random letters and digits, n from 1 to 6 | {RANDSTRING:3} -> R3V |
| {DATETIMEUTC:format} | UTC date/time in a .NET format | {DATETIMEUTC:yyyyMMdd} |
| Seed value | The next number to use (default 1000) | 1000 |
Common Mistakes to Avoid
- Adding a hyphen to the prefix. String prefixed number adds one already, so you get LOAN–00001.
- Expecting old rows to update. Existing values stay. Fix them by hand or with a flow.
- Using {RANDSTRING:7} or more. the first new row fails with an Invalid Argument error.
- Swapping the day and month. Use yyyyMMdd (MM is the month). The old yyyyddMM pattern gives 20262110 instead of 20261021.
- Panicking over gaps. A number is reserved when a row is started, so a canceled row leaves a gap. The same goes for imports, like our flow that imports a CSV into Dataverse.
Another one: moving the table with a solution doesn’t carry the seed. To set the next number in the target environment, call the Web API SetAutoNumberSeed action:
POST [Organization URI]/api/data/v9.2/SetAutoNumberSeed
{
"EntityName": "cr85a_assetloan",
"AttributeName": "cr85a_loannumber",
"Value": 500
}
Next Steps
Next, a Dataverse formula column can join the loan number and the borrower’s name into a friendlier label.
We’d keep going with these Dataverse guides:
Frequently Asked Questions
Can I change the primary column in Dataverse to another column?
No. It’s fixed when the table is created. You can only rename it or switch it between Plain text and Autonumber.
Is the Dataverse primary column the primary key?
No. The primary key is a GUID column such as cr85a_assetloanid. The primary name column is the text people see in lookups.
Does changing a column to autonumber update existing rows?
No. In our test, older rows kept their text; only new rows got LOAN-00001 and up.
How do I reset the autonumber seed?
Call the SetAutoNumberSeed action through the Web API with the next number; it affects only the current environment. Microsoft covers it in Create autonumber columns.
Where is the official documentation for Dataverse autonumber columns?
See Autonumber columns in Microsoft Dataverse on Microsoft Learn.

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.
What is the best way to populate the records that are already in the table before you added the autonum field?
Hi Debbi, this link may help you: https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Autonumber-column-for-existing-records/td-p/1798500