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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Newbie question - crea...
Power Apps
Unanswered

Newbie question - create a Dataverse table with multiple columns as primary key

(0) ShareShare
ReportReport
Posted on by 8

Hi, I'm completely new to Dataverse, trying to build a data model to help with a Power Apps implementation. I need to build three tables:

 

Locations -> list of locations we're tracking inventory at. Primary key = Location ID

Items -> list of items we're tracking inventory for. PK = item ID

Inventory -> the inventory of a given item at a given location on a given day. PK should be a compound key of location_id, item_id, and inventory_date

 

I've built the first two tables (Locations and items) with no issues, but Dataverse seems to "force" me to define a single primary key column on the inventory table...which just doesn't work. The PK needs to be location_id + item_id + inventory_date. I'm struggling with this seemingly simple requirement...can someone point me towards some learning materials that may help?

 

Thanks!

Scott

 

I have the same question (0)
  • Verified answer
    ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @SPowell4242,

     

    You can define alternate keys to enforce uniqueness across a set of columns. 

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • SPowell4242 Profile Picture
    8 on at

    Thank you for the info, I'll check it out!

    Scott

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard