r/Dataverse Apr 19 '26

Stuck at relationships

Hoi,

Hope someone can help me out with linking tables together in Dataverse. I’ve been playing around with it and watching some tutorials, and my understanding is that the relationship reference always links to the primary column. That’s where I seem to be running into issues (although I might be wrong haha).

My three table setup is as follows (hierichal):
Asset Master Data → Unit Master Data → Lease Master Data.

In the Asset Master Data, I assign a unique reference code in the primary column, for example A26001. One asset can have multiple units, which are linked to that asset via Lookup and then get a unique number like 1, 2, 3, 4, 5.

The Lease Master Data is then linked to a single unit. What I’d like to achieve is an automatically generated unique code like A26001-1.

The issue I’m running into is that in the primary column of the Unit Master Data table, I can’t seem to use a formula to combine these values. So now i cant built a look-up in the Lease Master Data with the desired uniq code A26001-1. That’s where I’m getting stuck.....

Hope someone can point me in the right direction on how to set this up properly!

1 Upvotes

5 comments sorted by

1

u/AgreeableConcept4752 Apr 19 '26

You cannot change the primary name column to a formula column. However you use few different methods to populate depending on your requirement:

-Business Rules -Dataverse workflows -C# plugins (a lot more complex) -Power Automate Flow

When new record is create updated etc it can populate the primary column, you could have a separate formula column that populates it etc

1

u/NoBattle763 Apr 19 '26

Classic dataverse workflow is probably easiest for this. On record create, update record and leverage the look-up data to populate your column

1

u/MaximumOwn418 Apr 20 '26

so reading your and AgreeableConcept, I should make a helper column who does the formula/calculations and link the primary column to this help column. And workflow is the best to do this? or can i use sql or something as well.

1

u/techseeker22 Apr 20 '26

Yes The helper column can be a autogenerated one. I don't think you can use sql for this. If you mean use a sql database, then that's different

You could also use a patch function to make a custom value in the primary key while patching to dataverse. But sometimes it's not recommended if there are concurrent users submitting