Be able to specify by calculation pretty much everything in Scripts.  At least fields, variable names and a few other key things.

Idea created by DavidThorp on Jun 16, 2018

    We've been able to go to a layout name by calculation since forever.  Some other - otherwise hard coded - areas of FM have been able to be calculated for a long time.  But why only those few?  Let's take it further...


    • The "Set Field By Name" script step is great, but... why a separate script step and only that one?  Why not just add the option for calculating the field name in the original Set Field script step - and in doing that, it could be used everywhere the Specify Field dialog has been to date (all the Insert script steps and everywhere else it's used)?


    • What used to be a [Specify…] button next to the repetition number in Specify Field and Set Variable, is now sometimes an [fx] button.  Just as good or better.


    • Similar to how Go To Layout can be specified with "Layout Name by Calculation…", Why not "TO name by calculation..." in GTRR's TO selection - and the same anywhere else a TO name is chosen?


    • Elsewhere in this community it's been requested that we be able to calculate the variable name in the Set Variable script step, but… In some places now in FM17 the Specify Field… dialog is replaced by Specify Target… and gives us the option to choose a field or a variable.  Both of those could have a [Specify…] or [fx] button next to them to allow us to calculate the name of the field (and TO) or the name of the variable.  There are also other places a variable name can be entered, and I think that should be calculatable as well.


    The bottom line here really is, I'd hate for FMI to only half do this:

    • They changed Specify Field to Specify Target (allowing a variable to be entered instead of a field if desired), and for the most part did that right because it's implemented almost everywhere Specify Field was before.
    • In a similar way I think it's important that being able to calculate the name of a variable be implemented everywhere also, not just the Set Variable script step.
    • The ability to calculate a field (with TO) name (as was done with the Set Field by Name script step) should be implemented everywhere, not just in that one place (as was done with the "Set Field by Name" script step).
    • The ability to calculate the TO name in the GTRR script step (and is there anywhere else only a TO is chosen?)
    • etc...


    Some might argue that creating all these new levels of indirection is not "the FileMaker way" but I have to challenge that.  The "Layout Name by Calculation…" option, and other FM features (Evaluate function!), have been part of "the FileMaker way" for 20+ years.  So... why stop there?