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 / Newbie question - crea...
Power Apps
Answered

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

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard