I have scripts that I write that I have to import into a lot of different databases. These databases always have tables and layouts with different names. In order tio run these scripts I also have to create a number of calculation fields in their tables. In order to cut down on the amount of time it takes me to configure these scripts I was wondering if anyone knew a way to get to a field by calculation, rather than by explicitly going to it.
For example, in a script I go to a field "camera" but the script has no idea what the name of the table is. When I import the script I then have to go into the script and set it to something like "dailies::camera." However, I know there is a get function, Get(LayoutTableName) and I have tried a couple ways to use that to no avail. I tried using:
Go To Field [Get(LayoutTableName) & "::camera"
...and this did not work. I also tried:
Set Variable [$field; value:Get(LayoutTableName) & "::camera"
Go To Field [$field]
...and this did not work. I guess with "Go To Field" you can only use an explicit field name. In case there's an entirely different work around I haven't though of, the next steps in the script are:
Set Variable [$appendScriptLine; value:"echo "/"Camera=" & Get(ActiveFieldContents)]
Perfom Applescript["Do Shell Script " & Quote($appendScriptLine)]
This is to build a shell script which I eventually launch so the values in the field I use are to export the text in them to a document outside of Filemaker.
There are anywhere from 20 to 30 of them taht I have to set up explicitly on every database I import these scripts to and am trying to get them to be a little more "self configuring," if taht makes sense.
Any help would be greatly appreciated.