October 7, 200817 yr 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.
October 7, 200817 yr Author 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?
October 8, 200817 yr 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.
Create an account or sign in to comment