4 Replies Latest reply on Oct 17, 2012 3:48 AM by FarfelKnabe

    Unwanted Scripts?

    FarfelKnabe

      Title

      Unwanted Scripts?

      Post

           Hi all,

           When I began building the database I didn't think of sorting all the scripts in easy-to-find folders or using easy understandable names, so I in the script name could see where the script was being used and what the script was doing - I have began doing so now.

           So now I have a bunch of scripts in my database that I don't now if I have any use for anymore. I know I can delete them manually one by one, but that would be really time consuming! Is there a way to detect if a script is in use (e.g. added to a button or field or being used by another script)? Or is there a way to add a counter to a script (e.g. all scripts) so that I can see the usage and there detect any unused scripts?

            

           /Andreas

        • 1. Re: Unwanted Scripts?
          HeikeLandschulz

               Hi Andreas,

               if you have the FileMaker Advanced you can create the DDR and check it with the tool CrossCheck   http://fm-crosscheck.com/Home.html

               Heike

          • 2. Re: Unwanted Scripts?
            raybaudi

                  

                 Hi
                  
                 1) create a global text field
                 2) place this script step as the first step for all your actual scripts:
                  
            Set Field [ YourTable::YourGlobalTextField ; List ( If ( not ValueCount ( FilterValues ( Get ( ScriptName ) ; YourTable::YourGlobalTextField ) ) ; Get ( ScriptName ) )  ; YourTable::YourGlobalTextField ) ]
                  
                 3) use extensively your DB for some days
                  
                 At the end you'll find the names of the used scripts listed into that global field.
            • 3. Re: Unwanted Scripts?
              Orlando_1

              Hi

              Another tool worth considering is Base Elements by Goya, I have been using it for years and does a great job in tracking unreferenced elements, errors and alerts on your system, and you can build up a library of snapshots to see how the system is growing in terms of the schema, and how much of the unused elements are being removed over time.

              http://www.goya.com.au/baseelements

              Hope this helps

              -- Orlando

              • 4. Re: Unwanted Scripts?
                FarfelKnabe

                     Thanks for the answers,

                     The solution from Raybaudi is not tested on a few scripts and it seems to work. Only drawback is that I doesn't count the number of times a script has been used!

                     /Andreas