Polymorphic relations. When creating relation, ability to have many Types from which to choose, and not just one Type

The other thing that’s non-ideal about bi-directional links is they are all in one place, they cannot be categorized into collections.

To hopefully make it more clear why I want polymorphic relationships (and to see if others have suggestions how to accomplish my goals in other ways), I’ll outline my data and workflow similarly to @B_Sp.

I work at a small real estate development company. We have a lot of data on Properties that we want to track - location, size, assessed value, etc. We keep property info in its own App with a Property Type.

For each property, we want to show Ownership (who/what owns the property). We track People/Companies/etc. in its own App as well. In this app we have Contacts (people), Companies, Partnerships, and Trusts. Each of these are separate Types because they each track different info. Partnerships need to track the owners (also a relation to Contacts), where Companies track employees (not owners), etc.

The alternative is to define perhaps 2 types, Contact and Company, and use a dropdown in Company to define what type of organization it is (Company, Partnership, Trust). But then we end up with a lot of fields on every one of them that are not used. On Company we have information about a Trust that will never be used, etc. So we have 4 types for these. And any one of these 4 different types can own a property!

So we have a Property Entity. We have relationships with all 4 types because any of them can own a property. And in fact some properties are owned by multiple owners. So on the Entity view for every property we have 4 different relationships shown, all of which are just there to represent ownership. We have to name them “Ownership (Company)”, “Ownership (Trust)”, and so on.

Would I would like to have is a single relationship field called “Ownership” which allows multiple entities to be selected from a specific set of Types (the 4 I mention above). Then list them all under the “Ownership” relation. This would be much cleaner than what I think I have to do now.

Maybe I’m missing a better way to do this though. If so, please let me know.

Also, while it’s off-topic for this thread, I’ll mention that another feature that could solve this particular problem (though not all situations needing polymorphic relationships) would be conditional Field sets, i.e. fields that show or hide based on the contents of some other field. So we could configure 4 different variations of the “Contact” Type, selectable with a drop-down which shows or hides fields as needed. Ideally this would also change the name of the Entity dynamically to indicate whether it’s a company, trust, etc. I want this feature too, but I’d prefer polymorphic sooner, and it seems less complicated.

2 Likes