5 Replies Latest reply on Jan 17, 2016 7:12 PM by brsamuel

    specifying the current table in a script

    tkessler45

      I'm writing a script that only uses global variables, and would like this script to apply to a number of different layouts. My approach is to write the script such that it targets the global variables by name, but the limitation here is that to do so, I need to specify the table for the globals as well, such as the following for "Set Field":

       

      Set Field [ table1::globalvar, value ]

       

      The problem is that for this to apply to another table, I would have to re-write the script so that "table1" is now "table2" in this Set Field step (and others).

       

      I'm wondering if there is a way to specify a target field name only for the "current" table, so I can write a script with statements like the following, and then have them run on any current table or layout, provided the required fields are present:

       

      Set Field [ ::globalvar, value ]

       

      Is there any approach in FileMaker that can do this? I'm running FileMaker Pro Advanced 14, with databases hosted on FileMaker Server 14.