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 / New to Dataverse-Prima...
Power Apps
Answered

New to Dataverse-Primary Column, Not Unique, But Must Be Used as a Lookup Does Not Make Sense-Help

(0) ShareShare
ReportReport
Posted on by 5
Hi folks - please help. I'm new to Dataverse and I'm pretty frustrated at the moment. For two days now I've been trying to get my head wrapped around Dataverse's primary keys, alternate keys, primary columns and relating tables with lookups. I've redesigned, deleted and created my tables too many times, and now I'm turning to the community for help. 
 
Here is what I'm trying to do; maybe my design is off and someone can think of a better alternative. I need to create a Canvas app that will allow the users to input a new record for a product when it has entered our facility to start its journey through a process. The product has a unique identifier, think of a serial number, a service tag, or a sku. Let's go with Service Tag as the unique identifier.  So this parent main table will be called "Product Main." For now it has four columns;
 
1. Product Service Tag (Text. Needs to be unique so no one can duplicate the Service Tag when entering a new record)
2. Product Location (Choice, A01, A02, B01, B02, C01, C02)
3. Product Process Step (Choice. New, Step 1, Step 2, Step 3, Ready to Ship, Shipped)
4. Product State (Choice; In-Process, Complete, Has an Issue)
 
So far so good, right. I created the above table. I did not use the Dataverse Primary Column, or I suppose I could make it auto-number if I had to, because in order to implement uniqueness for the Product Service Tag, I made that its own column and I had to make that an alternate key. (As a sidenote, the Choice drop downs in my table did not work until I set a default value for them. That's a bug, imo). 
 
The second thing my users need to do is to provide a status, every 30 minutes, on each product as it progresses through our internal process. So I will create another table called Product Status Log where the users can select the Service Tag and enter a quick update on the product in a text field. So this table will simply be three columns. 
 
1. Product Service Tag (Lookup. Should lookup existing Service Tags from the Product Main table)
2. Status Color (Choice. Red. Yellow. Green.)
3. Status Update (Text). 
 
So this is a classic parent/child or 1:Many relationship. One Service Tag can have many log entries. In the Cavas App, I'll have a screen where a user can select a Service Tag and they'll get a scrollable view of all the Status entries so they can get a full history of the product working its way through the internal process. 
 
Here's the problem. From what I understand, the Lookup column in the child table (the many table) HAS TO BE the Primary Column in the parent table. BUT the Primary Column has no ability to be unique. Do I have this correct? I cannot believe Dataverse is so rigid with this silly Primary Column. That has to go, imo. The GUID is the primary key, and it's setup by default. That's good. So now MS, you should allow us developers to be able to create and define columns as we need to. And also, allow us to choose the column in a parent table for a Lookup. Again I'm very new to Dataverse, but have a solid understanding of DB concepts. But maybe I'm missing something here. Again, this will be a Canvas app to enter new records, enter log status entries, view product state, and product status entries but first I need to get my DB tables designed and working correctly. 
 
Thanks for reviewing and any assistance. 
 
 
I have the same question (0)
  • Verified answer
    bscarlavai33 Profile Picture
    752 Super User 2026 Season 1 on at
    When you create your Product Main table, you could change the default Primary Column of "Name" to Product Service Tag and then you can make Product Service Tag an Alternate Key which would make sure it is unique.
  • JK-06081641-0 Profile Picture
    5 on at
    bscarlavai33 - FABULOUS!!!! You're a genius. Humans 1. AI 0. That worked. 
     
    No where, in all the docs, posts and videos did anyone mention that the Primary Column could also be an Alternate Key. When you create the Primary Column, this is a little key icon near it, so I assumed it was some sort of key setup by default and could not be changed. ALSO, when you view our table keys, it does not show up. Anyway, I renamed the Primary Column to Service Tag and made it an Alternate Key. It solves the unique problem and also works as the lookup column table in the Status Log. 
     
    Cannot thank you enough. Now I'm off to creating the Canvas App. 
     
    Thanks!!!! 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard