1 Reply Latest reply on Oct 18, 2012 10:20 AM by philmodjunk

    Issues with Copy



      Issues with Copy & Paste Script Steps


           I have a script that includes some copy and paste script steps.  It works fine for most users.  I have one user for whom it does not work.  All of the other steps in the script work for this user but it does not execute the copy and paste steps.

           The script populates several fields via the set field step in the current parent record.  This all executes correctly.

           Here is what does not work for this user:

           Copy [Select; ItemSpecs::admItem_ID2]

           Go to Layout ["Job Ticket" (JobSpecs)]

           New Record/Request

           Paste [Select; JobSpecs::admItem_ID]

           It goes to the Job Ticket layout and creates the new record but it does not paste the ItemSpecs::admItem_ID2 into the JobSpecs::admItem_ID field.

           The file is a FM 10 file running on FM Server 10 but the user is on FM 11.  Could this be the problem?

           Any help would be appreciated. 

        • 1. Re: Issues with Copy & Paste Script Steps

               I recommend against using copy and paste for this type of task.

               Use this script instead:

               SetVariable [$ID; value: ItemSpecs::admItem_ID2]
               Go to Layout ["Job Ticket" (JobSpecs)]
               New Record/Request
               Set Field [JobSpecs::admItem_ID ; $ID]

               Copy and Paste script steps have two issues that the above script avoids:

               1) The referenced field must be present in order for the step to work. If the field should be removed from the layout, the script step silently fails to work.

               2) Copy replaces any data the user may have previously copied to the clipboard with the data copied by this script step. Users become annoyed and confused when data they have copied mysteriously changes each time this script is performed.