All scripted data manipulation must be able to be done on an empty layout and in any major environment.

Idea created by Magnus Fransson on Aug 31, 2017
    Active
    Score9

    Hi all, and FMI represents,

     

    What I’m proposing here is “a new a strong design philosophy/rule fore future versions of FileMaker.” It will have an impact on some existing script steps and functions (of which I address a few) and most likely many future script steps and functions. It does of course have some very clear benefits.

     

    The rule is: All scripted data manipulation, must be able to be done “on” an empty layout and in any major environment (like server, client, pro, advanced, SDK-APP and more).

     

    (“On” a layout, because layouts are still used for defining context, but there can never be asked, that there is any object on that layout.)

     

    The most obvious changes would of course be to: Insert File, Insert PDF, Insert Picture and Export Field Contents; but more is affected.

     

    The benefits are (among others):

    • Uniformity. The same script can be used (all data, including container fields, can be manipulated) in all major environments.

    • Increased performance. Since the layout is empty, no data has to be fetched. (And PSoS is easier to implement.)

     

    The possibilities are many:

    • “Interoperability” scripts (using different API’s) on the server can easily manipulate all kinds of data (including containers) from server, means less need for “robots”.

    • An e-mail script, running on the server, could attach a file stored in a container field, by exporting it first.

    • A script that is creating a PDF on the server, can store that PDF in a container field.

     

     

    Below follows a series of lists of script steps in the “Fields script steps” category:

     

    Data manipulation

    Relookup Field Contents

    Set Field

    Set Field By Name

    Set Next Serial Value

     

    User interface

    Insert Audio/Video                

    Insert Calculated Result         Already has a valid replacement. *1.

    Insert Current Date                Already has a valid replacement. *2.

    Insert Current Time                Already has a valid replacement. *3.

    Insert Current User Name     Already has a valid replacement. *4.

    Insert File                              

    Insert From Device                

    Insert From Index                  

    Insert From Last Visited       

    Insert From URL                     ? *5.

    Insert PDF                              

    Insert Picture                         

    Insert Text                              Already has a valid replacement. *1.

     

    *1. Is easily replaced with just "Set Field".

    *2. Is easily replaced with a combination of "Set Field" and "Get(Current Date)".

    *3. Is easily replaced with a combination of "Set Field" and "Get(Current Time)".

    *4. Is easily replaced with a combination of "Set Field" and "Get(Username)" or "Get(Account Name)".

    *5. I'm not sure if this script step really belongs in the "User interface" category.

     

    Script steps that has to get a new/optional way to do things in order to meet the criteria.

    Insert Audio/Video                

    Insert File                              

    Insert From Device                

    Insert From Index                  

    Insert From URL                     *6.

    Insert PDF                              

    Insert Picture                         

    Export Field Contents            

    Replace Field Contents         

     

    *6. I do know that this script step (and a few more) supports returning the result in to a "$Variable" . That might or might not be enough, but I let others be the judge of that.

     

    This is more than just “fix these script steps and I will be happy” request. It is about how new functions shall be implemented in the future of FileMaker.

     

    It means that there must be a way, for any and every new and old data manipulation, to be made, that meet this two criteria.

     

    1. Can be done without any object on the (context giving) layout.

    2. Can be done in any major environment (like server, client, pro, advanced, SDK-APP and more).

     

    Now I’m only hooping that the community and FMI agrees with me, that this is a well thought trough way forward for FileMaker, that will bring us many strong , useful and uniform new things in the future.

     

    Best regards Magnus Fransson.