Collapsible script steps (not whole section)

Idea created by HOnza on Aug 31, 2016
    Active
    Score22

    Issue

    Long scripts are hard to read, common patterns take too much space and it's from hard to impossible to make important non-common parts to stand out.

     

    Common solution in other dev envs

    In other development environment this is usually solved by macros or inline functions/procedures/subroutines

     

    Suggested solution in FileMaker Pro

    To achieve the same effect (hiding common patterns) without too much development effort on the FMI side and without having to change the file format etc., I suggest using special flag in comments and only change the visual representation in the Script Workspace, as demonstrated on the attached illustrations.

     

    Current common practice looks like this:

    Collapsible script steps - current practice.png

     

    This could be the collapsed and much more readable view:

    Collapsible script steps - collapsed.png

     

    This could be the expanded view (after clicking on the triangles):Collapsible script steps - expanded.png

     

    And this is one possible way to actually implement it without affecting the file structure:Collapsible script steps - implementation.png

     

    Of course, you can probably implement it in a safer and more reliable and user friendly way, this is just to demonstrate the concept.

     

    In any case, I hope some script readability tool of this or similar kind appears in FMP rather sooner than later as it would save a lot of development time and even more troubleshooting time.

     

    Please do not confuse with the "collapsible section" feature request.

    The key part of this suggestion is that the script steps inside (between the starting and ending part) would remain visible in the collapsed state.