cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AB18
Frequent Visitor

One-to-one 1:1 relationship between tables

Hi,

 

At the moment it is not possible, but it would be nice if it will be possible to create an 1:1 relationship between the tables in Dataverse. 

1 ACCEPTED SOLUTION

Accepted Solutions
EricRegnier
Super User
Super User

Hi @AB18,

The workaround is to have two relationships, 1-N and N-1 between the two entities and have custom logic (such as classic workflows) to populate the the lookups on each entity. Feel free to vote on this feature request at: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/One-to-one-1-1-relationship-type-in-Common-Data...

Cheers

View solution in original post

8 REPLIES 8
AB18
Frequent Visitor

And what is the reason why this is not possible atm?

Fubar
Solution Sage
Solution Sage

There is not a native 1:1 but you can mimic it by putting a Lookup on each entity (for the other end of the relationship) and when you populate one, you also populate the parent using workflow/plugin/flow (and you also stop the creation on another child record if the parent is already populated).

EricRegnier
Super User
Super User

Hi @AB18,

The workaround is to have two relationships, 1-N and N-1 between the two entities and have custom logic (such as classic workflows) to populate the the lookups on each entity. Feel free to vote on this feature request at: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/One-to-one-1-1-relationship-type-in-Common-Data...

Cheers

@AB18 

 


@AB18 wrote:

And what is the reason why this is not possible atm?


This is because you can already model it by just another Column on the Table. Usually having two Tables with 1:1 is not needed in Dataverse. 

 

For now you can try the suggestion of @EricRegnier as well as that of @Fubar 

 

It also may be possible to produce this functionality right now, in pretty solid way by using a Custom C# Plugin as well, also alluded to by @Fubar - however, this is also requiring pretty much same setup as the one @EricRegnier suggested with mirroring the N:1 and 1:N with Lookup on both ends, and setting these, and then not setting it if already populated, and if it already can be done with Classic Workflows, that is much simpler to implement than C# plugin, so that is why we recommend you try that suggestion actually if it will accomplish the goal in your case.

EricRegnier
Super User
Super User

Yeah, where possible I always suggest to go out-of-the-box low/no code versus customizations like plugins...

@AB18 

Unless there is a good reason not to do it, merge the two tables into one.

Hi @Fubar  you write "also stop the creation on another child record if the parent is already populated" is this done by a business rule or something else?

@shavora real-time workflow or plugin code.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,955)