5 Replies Latest reply on Feb 23, 2017 8:12 AM by philmodjunk

    Copy script step on FileMaker Go

    pruppert

      Is there some trick to getting the Copy script step to work on FileMaker Go? It seems to be a very simple script, but I cannot get it to set the iOS clipboard to the specified field.

        • 1. Re: Copy script step on FileMaker Go
          philmodjunk

          Why do you want to use Copy? It should work if the field from which you are copying is present on the current layout, but many new developers use copy when they should be using another script step such as set variable....

          • 2. Re: Copy script step on FileMaker Go
            Markus Schneider

            'copy' needs the field in the current layout... do You have separate layouts for Go? Could be that the field is missing

             

            As Phil mentioned, IMHO. it's better to replace the 'copy' by 'set Variable'

            • 3. Re: Copy script step on FileMaker Go
              Benjamin Fehr

              I'ld recommend to use

                   set Variable [ $$myVar ; MyTable::MyField ]

              instead of 'copy' since this is more reliable.

               

              Always mind your "Focus": In which layout am I and which relation would work in this context when the script is supposed to SetVar (or copy a value).

              • 4. Re: Copy script step on FileMaker Go
                pruppert

                Reason for using Copy was to have a calculated file name set to the iOS clipboard to paste into the following dialog that appears when you export field contents. I ultimately am wanting to programatticaly name the exported file. Turns out I did not have the field on the layout to copy from. Adding the field to layout fixed the Copy issue

                 

                I ultimately ended up using a variable to set the file name in the export field contents script. A little easier that way.

                 

                Thanks for the helpful replies.

                IMG_7355.PNG

                • 5. Re: Copy script step on FileMaker Go
                  philmodjunk

                  You can specify the file name and file path as a variable in the export field contents step. You simply use set variable to assign file path and name to the variable, then enter the name of the variable as the "file" reference. Thus, copy should not be needed. Set Variable is more robust and should the user have copied data to the clipboard previously, that data is left untouched by Set Variable unlike copy.