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

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

Recommended Posts

Posted

Hello All!

This should be really simple...

I have 2 database tables that are unrelated (and I wish them to stay that way). I'm wanting to pass some data from certain fields in one table into a new record in the other using a script.

Using the set field script step or insert calculated result doesn't seem to pass anything - the lack of relation seems to provide no 'source pointer' so to speak and I don't want to copy & paste the data!

In the past I have avoided such a problem by relating the two tables in question (which then seems to allow the set field script step to work).

What is the best method of passing this data or a way to set some kind of pointer or reference point in the source file combined with a calculation maybe?

Thanks for any help!

Posted

If the tables are in the same file, you can use script variables to hold the data temporarily. Check out the Set Variable[] step.

If they are in different files, it's a little more work; you could assemble the data into a string (maybe with named parameters) and send it as a script parameter to the external script. Then parse the script parameter in the destination file.

Posted

Thanks for the reply - just the advise I needed...

Out of interest, has the Set Variable option been introduced recently (i.e. FM 8 >) as I don't recall this being here before!!

With the tables being in the same file, this looks like it will do the job, however, [if I may] could you give me more details on assembling a string in FM (for when this pops up across multiple files in future) ???

Thanks again

Posted

In FileMaker 6 you can write to global fields in either file and "see" them across any relationship, in the other file. That's typically how this kind of thing was done in 6 but script variables and script parameters are the new way to do this.

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