Create Variable Function

Idea created by Vincent_L on Dec 6, 2016



    To create variables, seasoned filemaker developers often use an evaluate of a let statement. But that's hacking the evaluate function that wasn't really made for that. Given the fact that Evaluates gets slower and slower with the bigger the string its has to process grows (I've had script whose evaluate, for parameter passing, hogged the CPU for 1 our), and that variables can contain a lot of data, and that a lot of the use of evaluate is to create variables, I think this is time to address the situation and create a new function optimized for this use.


    I think  that a new function, that can be called anywhere, is much more versatile than a new script step. Furthermore, if it would ab a script step rather than a function, people would continue to use evaluates to create variables outsides of scripts.


    So here's it is




    varname : is the name of the variable with the the $ sign. so if we write "$$myGlobalVar" this would be a global one, if we write "$myLocalVar" it would be a local one.

    contents : it's the  string of the contents

    repetion_index : the index of the repetetion


    CreateVariable("$mylacolvar","hey look at me";2)


    would create  the variable $mylacolvar[2] with "hey look at me" contents


    I think it would help the native parameter passing (among other things)