How do I create a button/script that creates a new record in a related table with the ID auto-populated?
I have a main table with an ID number (mrnID) and this table is related to another table (test) that has an ID number (testID) for each record (one to many). I can create a button that creates a new record in the test table, however, I have not been able to figure out how to make it auto-populate the mrnID field on that table.
Can anyone help?
#From a layout based on the Main table
Set Variable [$ID ; MainTable::mrnID]
Go To Layout [test]
Set field [Test::mrnID ; $ID]
#Next step depends on what you want to do next now that you've created the related record
go to layout [original layout]