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

Community site session details

Session Id : BOT02hEEU114tKzvSuTWIG
Power Apps - Microsoft Dataverse
Unanswered

Using autonumbers as a primary key

Like (0) ShareShare
ReportReport
Posted on 19 Oct 2021 14:55:49 by 820

Hi

I am designing a database in dataverse

is it recomended to use unique ID of each record in each table as autonumber?

 

Simple example:

Customers table has these culums

Customer name

Customer code

Country

City

Adress line 1

Adress line 2

etc...

 

Shal i use in these type of tables additional column ID and set it as primary and autonumber?

 

Or i shall use columns ID as autonumber when i can not guarantee if at least one of the columns will always have unique value? entered by the user?

Categories:
I have the same question (0)
  • julijazas Profile Picture
    820 on 20 Oct 2021 at 08:32:27
    Re: Using autonumbers as a primary key

    Hi @rampprakash but if a user will lookup according this primary key(i understand i can add some more fields in Quick find view) final result when user click will return anything what is defined in primary name key.

    I can not return the field that i want from lookup table - it only returns to lookup field primary name key

  • Ram Prakash Profile Picture
    5,450 Super User 2025 Season 2 on 20 Oct 2021 at 06:50:41
    Re: Using autonumbers as a primary key

    Hello @jja,

     

    Consider a scinario, you have Account Table available for this Account Table ACCOUNTID is a PrimarKey(GUID) and it will be Unique, but if we provide GUID field to user its hard to remember.

     

    As per your Query try Creating One Autonumber field and make the Field Searchable, that will work.

     

    For Field Searchable --> Go to Settings --> Customization --> Customize the system --> Entites --> Expand Entities --> Expand the Entity where you want to make the changes --> Click Views --> Click Quick Find View --> Click FIND Columns --> Add the Field

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • julijazas Profile Picture
    820 on 20 Oct 2021 at 05:37:23
    Re: Using autonumbers as a primary key

    Thakns but it makes me confused then what is prinamy name key in dataverse table? Lets say i have table component name and project reference which is a lookup tonorher table and i need to haveprimary name column. In my scenario component name will not be unique as different projects can have same component names. If i set component name as a primary name key i understand it will be unique and will not allow to enter same component name? If yes then what is the primary name key in this table?

  • Fubar Profile Picture
    8,186 Super User 2025 Season 2 on 19 Oct 2021 at 22:08:41
    Re: Using autonumbers as a primary key

    By default your DataVerse table has a Primary Key - the internal GUID that is created when each new record is created (this field is generally not visible in the user interface but is the the table name with a suffix of "id" - this internal GUID is what links tables via Lookup fields (one-to-many) and many-to-many relationships.  If you want another field to act like a Primary field you would need to setup an Alternate Key (but the GUID will still be used for the relationships)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 752 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 472

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 358 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Loading started
Loading complete