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

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

Recommended Posts

  • Newbies
Posted

I have an accounts (income-expenses) table in a separate database. Can I script moving data via a $$variable into that outside table?

I see where I can Open File but it seems the script can't go to a layout outside its own database. I could hit the keys again and type the data into that outside table, but I'd love to script it.

Posted

You can call a script in the other file and pass it a parameter, using the Perform Script[] step.

Another option is to place tables from the other file on your relationships graph, create layouts for them and work with them directly.

  • Newbies
Posted

Edit: Found it ! Get(scriptparameter). Thanks very much.

Thank you.

===================

I see that I can call a script from the other file.

I don't understand how to pass a parameter, but I see the option to enter one in the Perform Script box.

Can I first open and fill a variable with the number and use that to Set Field on the other side's table?

Or can I pass the field directly to the other layout and Set Field on the other side using data from that field?

  • Newbies
Posted

Yes, thanks. I saw that I could, but because this is a rare occurrence, and no other need for that connection, I like passing the parameter and leaving them separate databases.

  • Newbies
Posted

Now that I've learned to pass a parameter, I want to pass three :

It seems possible, but I can't figure out how to include MiddleValues() function with Get(scriptparameter) function.

I have three $$ variables on the 'here' side.

FMP seems to let me do this if I surround the three with quotes and place carriage returns in between.

Perform Script ["ascript" from file: "otherfile"; Parameter: "$$var1 (carr-return) $$var2 (carr-return) $$var3(carr-return)"

If this is right so far,

On the 'there' side, how do I parse the three into three separate Set Field statements ( Using MiddleValues() )?

Posted

You only need to use $$variables if you need them AFTER the script has run - otherwise it's better to use $variables that are cleared when the script exits.

Also, you do not need to declare variables only to populate the script parameter; you can calculate the script parameter directly.

Parameter: "$$var1 (carr-return) $$var2 (carr-return) $$var3(carr-return)"

If this is right so far

No. There should be no quotes, unless you are sending literal text.

You do need concatenation operators in-between the terms, though:

$$var1 & ¶ & $$var2 & ¶ & $$var3




To extract the n-th value on the target side, use:




GetValue ( Get (ScriptParameter) ; n )

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