I think I see the problem in your script.
The reason the new record is created in the Contact table is because that is the context of the layout you are in when you issue the command.
To create a new record in the Bikes table you must first "Go to Layout" where the layout is based on the Bikes table. You can then create the record, set the fields required for the join and then flip back to the original layout for the user to complete the remaining fields.
Here is an example from one of my early solutions. Ignore steps 1 to 9 as they are just checking for my particular solution. Also step 18 is probably not required
I hope this helps.
Thanks for that extra4uk - think thats what I need. will have a go in my solution.
Do you know if there is any trick to making the script editor easier to use? cut/paste to text file etc seems not to work for me. Is this just a 'feature' or is there some way to make it easier to use?
You could start by understanding and mastering the existing features; including the various key shortcuts.
You might also try explaining what "easier to use" means to you.
FileMaker 14 script editor is getting rave reviews for being easier to use than previous versions.
I have been working on it. I've gone from a complete noob to scripting in the last week. I realised some of the features I wanted such as copy/paste, debugging and watch were all in the Advanced version which I've now upgraded to.
Not allowing copy paste in scripts in the non Advanced edition seems a bit cruel?!
happy holidays all (: