Kevin Cheesman Posted July 12, 2006 Posted July 12, 2006 Hi, I'm just getting to grips with FileMaker and I'm having a problem updating a field value in another table. I have an ID No field in my 'customer' table and an ID No field in my 'contact history' so that I can relate the records. I've used New Records, Set Field and Commit in my script, but the value will not copy over into the 'contact history' table. Any ideas?
Inky Phil Posted July 12, 2006 Posted July 12, 2006 Hi kevin How are you setting the id in the new (child) record Phil
Kevin Cheesman Posted July 12, 2006 Author Posted July 12, 2006 I have: Freeze Window Go To Layout ["Contact History" (Contact History)] New Record/Request Set Field [Contact History::ID; Sales Database::ID] Commit Records/Requests Go to Layout ["Main" (Sales Database) etc....
IdealData Posted July 12, 2006 Posted July 12, 2006 In fact I suspect that it isn't creating the related record any way. Check out the relationship settings and make sure that "create new records" is checked.
Kevin Cheesman Posted July 12, 2006 Author Posted July 12, 2006 I've checked that and it is ticked. The tables are linked on ID Anything else I can look for?
comment Posted July 12, 2006 Posted July 12, 2006 Set Field [Contact History::ID; Sales Database::ID] This won't work. A new record in Contact History does not (yet) have a related record in Sales Database, so the reference Sales Database::ID comes up empty. Define the button to pass on Sales Database::ID as the script parameter, and change the step to: Set Field [Contact History::ID; Get(ScriptParameter)]
Kevin Cheesman Posted July 12, 2006 Author Posted July 12, 2006 Sorry to be a pain but how do you set the parameter? I'm new to FileMaker.
Inky Phil Posted July 12, 2006 Posted July 12, 2006 When you nominate which script to attach to a button there is an option at the bottom to set an optional script parameter. Set this to Sales database::Id and then you can use it in your other file as per comments suggestion Phil
Kevin Cheesman Posted July 12, 2006 Author Posted July 12, 2006 Hi Phil, Perfect. Thank you! Is this the correct way to generate data in another table? This is what I would do in Access but FileMaker is very different. Kevin
Inky Phil Posted July 12, 2006 Posted July 12, 2006 It is one way of setting up the relationship. Once the id is transferred (and assuming the id is unique) you can then use the set field script step to set data in a related file. Phil
IdealData Posted July 12, 2006 Posted July 12, 2006 Have you looked at portals yet? There's little need to script things then.
Kevin Cheesman Posted July 12, 2006 Author Posted July 12, 2006 I'm going to be using portals for other jobs, but this one is to log times and dates behind the scene. We are using FileMaker's ability to be accessed on the web to allow sales reps to access our records and phone customers. We need to log the length/cost of their calls to reimburce them.
Recommended Posts
This topic is 6767 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 accountSign in
Already have an account? Sign in here.
Sign In Now