Hi Valtteri,
if my understanding is correct, Contract and Ownership are both parent entities of Car.
In this case, you could create an enricher with None as scope and trigger this enricher On Data Change during the form step. This enricher will fill FID_Contract with this kind of expression:
case when
lookup
distinct_count FID_Contract
from Ownership.Cars80
end
= 1
then
lookup
first FID_Contract
from Ownership.Cars80
end
end
This means that if only one distinct Contract is associated with the selected Ownership, then we take the first one to fill current FID_Contract.
I hope this helps.
Best regards,
Stéphanie.