3 Replies Latest reply on May 5, 2014 11:14 AM by philmodjunk

    Copy/Paste problems

    jhc

      Title

      Copy/Paste problems

      Post

           still having problem with my script that should record coordinates to create a KML file. I've copied a colleague's script that works but mine doesn't. 

           In trouble shooting I have removed the loop because I don't understand why it doesn't work nor how it is supposed to work. I narrowed it down to just doing one record. But even that doesn't seem to make a proper kml. 

           The issue seems to be copy and paste. I issue the 

      Copy [Select; <table::field>]

      Paste [Select; No style; <table::field>]

      commands but they don't seem to be doing anything.

      there's no real options other than to turn select on/off (which I've tried) so I'm stuck as to what could be wrong.

      my FMP file can be found here: ftp://ftp.geobc.gov.bc.ca/publish/Regional/Surrey/tmp_dikeForms/

           thanks

        • 1. Re: Copy/Paste problems
          philmodjunk

               Copy and Paste are almost never the right steps to use to copy data from one FileMaker Field to another, no matter whether the fields are part of the same record, or different records or even from different tables.

               Bot steps only work if the field they refer to is physically present on the current layout and browse mode access to the field is allowed. (Change behavior settings in the Inspector to deny browse mode access and the the script steps no longer work.)

               It's almost always a better option to use Set Variable in place of copy and set field in place of paste (with set field referring to the variable used in the set variable step.

               Another draw back to copy is that it destroys any data that your user may have copied--perhaps while working with a completely different application, and replaces it with the data copied by the script.

               If your user copies some data from a web page and this is interrupted by the need to work with your database and after working with it, they return to the first task only to find that they can no longer paste the data that they copied, it tends to confuse and irritate them.wink

          • 2. Re: Copy/Paste problems
            jhc

                 so in my script  (KML Maker) - would using Set Field wipe out all the content that was being stored in "KML Output" ? 

                 Is there an option for Set Field to append to the content rather than overwrite it all?

            • 3. Re: Copy/Paste problems
              philmodjunk

                   Certainly.

                   Set Field [YourTable::KML Output ; YourTable::KML Output & "new data goes here" ]

                   or

                   Set Field [YourTable::KML Output ; List ( YourTable::KML Output ; "new data goes here" // separates existing and new data with a return ]

                   and other expression also are possible.