Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6550 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted

Yes, in your script, there is a Set Variable step.

Posted

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.

This topic is 6550 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.