Hi @Jackw ,
Do you want to set the LookUp field value within your Entity3 to the same Entity1 record which is the same parent to Entity 2 and Entity3?
I have made a test on my side, please consider take a try with the following workaround:
You could generate a canvas app based on your Entity3, then add your Entity1 and Entity2 as data sources into this app.
Set the OnStart property of App to following:
ClearCollect(
Entity3ToEntity1Collection,
ForAll(
Entity3,
Entity3ToEntity1LookUpField.'Unique Identifier Column'
)
);
ClearCollect(
Entity2ToEntity1Collection,
ForAll(
Entity2,
Entity2ToEntity1LookUpField.'Unique Identifier Column'
)
);
// SameParentCollection is used to store the same parent identifier GUID value from Entity1 for Entity2 and Entity3
Clear(SameParentCollection);
ForAll(
Entity2ToEntity1Collection,
If(
Value in Entity3ToEntity1Collection.Value,
Collect(SameParentCollection, Value)
)
)
Then you could go to the Edit form, unlock the Entity3ToEntity1LookUpField data card, set the Items property of the ComboBox to following:
Filter(Choices([@Entity3].Entity3ToEntity1LookUpField), 'Unique Identifier Column' in SameParentCollection)
please re-load your app (fire the OnStart property of App), then the same parent record options for Entity2 and Entity3 from Entity1 would be populated into this ComboBox.
If you want to achieve your needs in Model-Driven app, I afraid that there is no way to achieve your needs currently. Currently, there is no way to configure one relationship based on another relationship in CDS.
Best regards,