web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Auto numbering rows in...
Power Apps
Answered

Auto numbering rows in a Dataverse table

(0) ShareShare
ReportReport
Posted on by 15
Hi
 
I have a tabel in Dataverse which already contains +100 rows. Now I would like to add a column with autonumbering to the table.
 
Is there any way to a make the autonumbering column place the values 1-100 in the existing rows - and then continue from 101 to the new rows?
 
wkr 
Jørgen
I have the same question (0)
  • Haque Profile Picture
    3,653 on at
     
    To my best knowledge, in Dataverse, adding autonumber column with existing rows, the autonumber values will be generated automatically for new records created after the column is added. Dataverse does not automatically populate autonumber values for existing records!
     
    Probably, needs a manual effort! 
  • Verified answer
    KV-18111202-0 Profile Picture
    15 on at
    The solution is a power automate flow, that gives numbers to the existing rows.
  • Suggested answer
    VASANTH KUMAR BALMADI Profile Picture
    322 on at

    Short answer: no — Dataverse autonumber will NOT backfill existing rows.
    This is by design, and there’s no setting to change that behavior.

    But there is a clean, supported way to achieve what you want.

    Why autonumber doesn’t work on existing rows

    When you add an Autonumber column in Dataverse:

    • It only fires on record creation

    • Existing records remain blank

    • The counter starts from the seed onward, but only for new rows

    Dataverse deliberately avoids retroactively changing existing data to prevent:

    • audit issues

    • ordering assumptions

    • concurrency conflicts

    So you cannot tell Dataverse:

    “Fill 1–100 for what already exists.”

    ✅ Correct and supported approach

    You need to do this in two phases.

    🔹 Phase 1 — Populate existing rows (1–100)

    Option A (recommended): Power Automate

    1. Create a temporary Number column (e.g. LegacySequence)

    2. Create a flow:

      • Trigger: Manual or scheduled

      • List rows from the table

      • Sort by Created On (or whatever order you want)

      • Loop with an index

      • Update each row with values 1, 2, 3, …

    Example logic:

    Initialize variable Counter = 1
    For each row:
      Update row → LegacySequence = Counter
      Increment Counter
    

    This gives you deterministic numbering.

    Option B: Excel export/import (quick but less elegant)

    • Export table to Excel

    • Add a column with 1–100

    • Re-import and map to a temporary column

    Still supported, just more manual.

    🔹 Phase 2 — Add Autonumber for future rows

    Now:

    1. Add your Autonumber column

    2. Configure it to start at 101

    Example:

    Format: {SEQNUM}
    Seed: 101
    

    From this point forward:

    • New records get 101, 102, 103…

    • Old records keep their legacy numbers

    🔹 Phase 3 — (Optional) Unify into one column

    If you want one single column:

    1. Copy LegacySequence into the new autonumber column for existing rows

    2. Lock the column (read-only)

    3. Delete the temporary column

    ⚠️ Note: This requires updating the autonumber column via API/flow before locking it.

    Important caveats (don’t skip this)

    • Autonumber does not guarantee gap-free values

    • Deletions will leave gaps

    • Concurrent inserts may skip numbers

    • Autonumber is for identifiers, not ordering logic

    If you need strict ordering, use:

    • a calculated sequence

    • or a custom flow-based counter

    ❌ What will NOT work

    • ❌ Recreating the column

    • ❌ Changing seed after creation

    • ❌ Making it “required”

    • ❌ Importing records again hoping autonumber fills them

    Dataverse will not retro-trigger autonumber.

    Summary

    • 🔒 Dataverse autonumber never backfills existing rows

    • ✅ Populate existing rows via Flow or import

    • ✅ Start autonumber at 101 for new rows

    • ✅ This is the only supported, production-safe method

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard