December 20, 200619 yr I have a script that I am using to create new records in a specific table, Injury. One of the fields in this table is a key linking the new injury record to the currently selected record in another table, Preferences. The overall process is this: 1. Go to Injury layout. 2. create new record. 3. Insert the contents of the ID field from the Preferences table into the appropriate ID field in the Injury table. 4. Return to the original layout. 5. Go to the first field for data entry. Problem is, I can't get the script to copy the key value from the first table and paste it into the appropriate field in the new record. I've tried everything I can think of - Set Field, Insert Calculated Result, even a Copy/Paste set of steps. I get nothing. What am I doing wrong?
December 20, 200619 yr Try setting a variable with the value in your Preferences table, then use a Set Field command to set the ID field in the Injury Table. Depending on how your interface is setup you may need to use s global variable or global field.
December 20, 200619 yr Author John, Thanks for the quick response. One question: when you say "set a variable", do you mean in the script, or somewhere else? Not sure how to set variables in FileMaker.
December 20, 200619 yr Author John, That got it. Used the Set Variable script step before switching layouts, and the Set Field step set it appropriately. Thanks so much. You cured a ton of frustration.
Create an account or sign in to comment