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

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

Recommended Posts

Posted

I have a database that is used to record inspection information in my manufacturing operation. When we find bad parts, information is recorded in a separate "Rejected parts database". The two tables are related by a serial number field. I'm trying to write a script in the Inspection database to open the Rejected parts database, create a new record and copy the serial number field contents from Inspection database to the Rejected parts database. Here is what I have, that is not working:

Open file["rejected parts log"]

Perform script ["new record" from file: "rejected parts log"]

Set Field[rejected parts log::box serial number;Final inspection sheet::box serial number]

The rejected parts log opens and a new record is created, but the box serial number is not copied?B) I can't figure out why? I've even tried to set a variable with the data to no avail.

Help.

Posted

Hi Bill,

Perform script ["new record" from file: "rejected parts log"]

Could you please share what's the contain of the Script Step?

Have you tried "Copy" and "Paste" function?

PS: I know this is not a good practice. It would be better to use variables (Set Variable and Set Field), but if this (Variables) did not work for you, you might try to use that (Copy-Paste). Maybe, other FM guru can give more information about using the Set Variable and Set Field for this particular case.

Posted

New record script:

Go to layout ["rejected parts log"]

Adjust window [Resize to fit]

Move/resize windo [Current window;Top 1; Left 1]

New Record/Request

Posted

Variable's scope is only one single file even though it $$ one, investigate this:

http://www.filemaker.com/help/FunctionsRef-264.html

Next question is why these files aren't related?

--sd

Posted

I believe you need to use the script parameter here, not the script result. Something like:

Perform script ["New Record" from file: "RejectedParts" ; Parameter: Inspection::InspectionID ]

...

Then "New Record" script in RejectedParts B)

Go to Layout ["rejected parts log"]

New Record/Request

Set Field [ InspectionID ; Get (ScriptParameter) ]

Commit Record

This topic is 6031 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.