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,428 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 395

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 287 Super User 2026 Season 1

Last 30 days Overall leaderboard