Heres another screenshot of the relationship
Yes, you should avoid scripts that use copy/paste unless you have a specific need for them and this script is not one of those cases. You can use set variable/set field in place of copy/paste and thus leave your clipboard unmodified when the script is performed.
Set Variable [$ContactID ; Value: Contacts::ContactID Matching Field ]
Go to Layout
Set FIeld [Equipment::ContactID Matching Field ; $ContactID ]
Ahhh....thanks Phil. I did try a variation of that script, but I see I didnt do it correctly. I'll give it a go tomorrow.
Thanks again........and again........and again
If you enabled "allow creation of records...." for Equipment in the contacts to equipment relationship, you can further simplify your script to use:
Set FIeld [Equipment::ContactID Matching Field ; Contacts::ContactID Matching Field ]
in place of the four highlighted script steps.
This avoids the need to change layouts in order to create the new record--which might trip script triggers on either of the two layouts involved.
Hey Phil, the 'Set Field' options worked perfectly.
Thanks again for all your help