3 Replies Latest reply on Jan 7, 2012 4:48 AM by exNewt

    Renaming or Change Name for FM Go database



      Renaming or Change Name for FM Go database


      I have tried to find it and cannot, so it appears one cannot re-name a database in FileMaker GO, just copy/clone, so you have "databaseXYZ" as the original, and "databaseXYZ copy", ""databaseXYZ copy 1", ""databaseXYZ copy 2" etc.

      Is there a way to do this in FM Go, be it by scripting? I have tried to modify scripts I have seen for "saving a copy with date in filename" and similar for the desktop, but have not been able to get them to work.

      Here is what I am trying to do. Say you have an auditing template - let's call it "audit - that you want to save a copy of so you know what/where you were that day

      The new file could be either:

      "audit-20120106" (filename + date)

      "audit of Sunnyvale (name you gave it in dialog box during save)

      "audit Suynnyvale" (the "Sunnyvale" is grabbed from a field in the database)


      PLEASE explain thoroughly, some of the formums and sites say things like "make it a variable" which - while many of us understand what that means - is not very illustrative. 

        • 1. Re: Renaming or Change Name for FM Go database


          Thank you for your post.

          FileMaker Go will not allow you to change the name of a file on the device.  However, you can create a new file that is a copy of the original file.  Here are the script steps you could use:

          Set Variable [ $File ; "file:audit-" & Year(Today) & Right ("0" & Month(Today); 2) & Right ("0" & Day(Today); 2)
          Save a Copy as [ $File ; copy ]

          The first line creates a variable name $File that includes the filename plus the desired date (and ensures there are two digits for the month and two digits for the day).  Then, you would reference the variable as the filename in the Save a Copy as script step.

          If you wanted to grab this from a field, then use as the first line:

          Set Variable [ $File ; "file:audit-" & <fieldname> ]

          Let me know if you need additional clarification.

          FileMaker, Inc.

          • 2. Re: Renaming or Change Name for FM Go database

            Thank you anyway. I feel like an idiot; I'm not a C programmer by any means but I have used FM for a while and have done basic scripting. Is this for FM 11 only? I am using 10 and no matter what I do I get this


            Save a Copy as [" $File" ; copy ]

            instead of 

            Save a Copy as [ $File ; copy ]


            I won't even describe the horrors of trying the previous line ("an operator is expected here" "table not found" )


            Let's hope that critical feature of renaming a database comes to FM GO 

            • 3. Re: Renaming or Change Name for FM Go database

              Well, it took a bit but it does work!