There are two documents. They are created independently by different users. The first document "Distribution" contains details "car", "driver"; the second document "Application" contains the same details.
It is necessary when creating the document "Application", the user fills in the auto field, if the distribution document is created for this car on that day, the driver field is filled in automatically, if not, the data is reset.
Tell me, please, how to implement it?