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?
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?
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.
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.
WarrenBelz
146,679
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,015
Most Valuable Professional