Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Here's what I am trying to do.

Working with the separation model I have two different files ("Interface_1" and "Interface_2") that both work with another file "Data".

In both Interface files I have the same Field that I need to have trigger a script when the value in it is changed and I'm doing that with the help of the zippScript plugin.

Typically (written in the Data file) I have the change in the Field triggered by an Auto Entered Calculation that replaces the existing value written like:

[color:blue]Field & zippScript_PerformScript( "Interface_1" ; "The Script" ; "")

...and that works just fine,... for the Interface_1 file. But it ignores the Interface_2 file needing the same functionality.

But since either Interface file or even both of them could be open at the same time how do I write the calculation so that it triggers the script in the active interface file where the change was made.

I thought I could do this with the Case function written like this:

[color:blue]Case (

FilterValues( DatabaseNames;"Interface_1") = "Interface_1"; Field & zippScript_PerformScript( "Interface_1" ; "The Script" ; "");

FilterValues( DatabaseNames;"Interface_2") = "Interface_2"; Field & zippScript_PerformScript( "Interface_2" ; "The Script" ; "");

"It didn't work")

...and I just get the default answer "It didn't work" which tells me I am not detecting the open database files with my FilterValues( DatabaseNames: text) function.

Posted

I figured it out,... I think,... or at least so far it's working.

I realized the FilterValues( DatabaseNames: text) function was what was screwing me up so I rewrote it like this:

[color:blue]Case (

IsEmpty ( FilterValues( DatabaseNames;"Interface_1") ≠ 1) ; Field & zippScript_PerformScript( "Interface_1" ; "The Script" ; "");

IsEmpty ( FilterValues( DatabaseNames;"Interface_2") ) ≠ 1; Field & zippScript_PerformScript( "Interface_2" ; "The Script" ; "");

"It didn't work")

Anyone see any problems I might not be aware of or see yet?

Posted

Can't see anything wrong with the original approach - especially as that's how it is exactly described in the FM help system.

I do notice an extra SPACE in the filename in the FilterValues test.

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