A better calculation text editor

Idea created by TriasDigitaalAmsterdam on Nov 18, 2016
    Active
    Score16

    Long gone are the times that the text of a calculation was one string, without returns and tabs. Unreadable when it was a complicated calcalution. But FileMaker still misses a lot of the offerings of dedicated text editors for programmers. Find/replace, text coloring and last but not least: auto indenting.

    Strangely enough the script editor has always had auto indenting, so why not the editor of the calculation engine?

     

    I like it very much when everything which is programmatically of the same level, is also indented the same. It makes it much easier to understand what belongs to what, where things end, etcetera.

     

    For instance, what is better understandable,

    this:

     

    let([~this=patterncount(field;"text");~that=substitute(field;["that";"this"];["such";"so"];["¶¶";"¶"];["  ";" "]);~realy=patterncount(anotherField;constant)];case(~this;~that;~realy;"otherwise"))

     

    or:

     

    let(

         [ ~this = patterncount( field ; text )

         ; ~that = substitute( field ; [ "that" ; "this" ] ; [ "such" ; "so" ] ; [ "¶¶" ; "¶"] ; [ "  " ; " " ] )

    ];

         case( ~this ; ~that ; ~realy ; "otherwise" )

    )

     

    or, how I do it:

     

    let(

         [ ~this = patterncount( field ; text )

         ; ~that = substitute(

                             field

                             ; [ "that" ; "this" ]

                             ; [ "such" ; "so" ]

                             ; [ "¶¶" ; "¶"]

                             ; [ "  " ; " " ]

                        )

    ];

          case(

              ~this

              ; ~that

         

         ;     ~realy

              ; "otherwise"

         )

    )

     

    Auto indenting would make editing much faster, at least, my editing, and enhance readability, also for others.

     

    Martin Spanjaard

    Trias Digitaal

    Amsterdam