Skip to main content

Notifications

Community site session details

Community site session details

Session Id : gHKGULO4P7H3GTF/4D1lE3
Power Apps - Microsoft Dataverse
Answered

Best way to store ID in dataverse

Like (0) ShareShare
ReportReport
Posted on 15 Sep 2023 06:21:17 by 7

Hello. 

What is the best way to store ID in dataverse?

For example, usually I am using INT in SQL, or autonumber ID usual field in Sharepoint.

But in dataverse we have Autonumber and why it is text field? How I can change it to number?

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on 15 Sep 2023 at 06:43:25
    Re: Best way to store ID in dataverse

    Hi @PowerUser666,

    It is by desin, autonumber columns are formally just text columns.

     

    If you want to use an Whole Number field for AutoNumber you can Create a new Field with Text (AutoNumber) and Copy the Number to Whole Number field and Use it.

    Try the following formula to copy automate column value to whole number column:

    ForAll(AddColumns(Sequence(Value(First(SortByColumns(Table,"crba2_auto",Descending)).Auto)),"CC",Text(Value)) As A,Patch(Table,LookUp(Table,Auto=A.CC),{Number:A.Value}))

    crba2_auto is a autonumber column. 

  • a33ik Profile Picture
    3,304 Most Valuable Professional on 15 Sep 2023 at 06:34:19
    Re: Best way to store ID in dataverse

    Hello,

    Autonumber is of the type of string because it's possible to add letters to it as a prefix and postfix and/or trailing zeros that won't be possible to add as a number so the string is the only type.

    If you want to have it as a number you can add some kind of automation (plugin or power automate flow) that will take the generated number and copy it to the whole number field.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics

Loading started