4 Replies Latest reply on Oct 7, 2016 3:15 PM by Tom Helsley

    (Dispatch) How to apply a variable value from a file to all files that it contains

    Jonathan Gourlie

      I am creating an ECN process that attaches the parts/assemblies being changed to the ECN document (paste as reference) so that I can transition all of the parts in the ECN by just transitioning the ECN document.  I want to create a dispatch script that will execute on the first transition of the workflow and copy the ECN Number and Name from the ECN document to the corresponding values in the part/assemblies.

       

      How do I apply the name and number from only the ECN document and apply it to all of the other files that are going through the same transition?

        • Re: (Dispatch) How to apply a variable value from a file to all files that it contains
          Stephen Lapic

          We don't have a need for it to appear as a variable but we also want to have the number as a reference if needed.  We found the easiest thing was to type the number (it's short) into the comment section when doing a transition.  This would then appear in the history.

          • Re: (Dispatch) How to apply a variable value from a file to all files that it contains
            Craig Schultz

            I have thought about doing this too.  I can't wrap my head around it totally, but here's what I was thinking:

             

            Create an ECN folder.  Have folder card variables with the EC information.

             

            Move all effected files into that folder.

             

            When you do the transition to start the ECN process, roll the ECN number/descriptions/dates to the next set of ECN variables (we have 3 sets on the drawings), then populate the ECN information though the transition pulling the info from the folder card variables...  Name your transitions for the EC document and the parts/assemblies/drawings the same.  That way it you can transition all of them at the same time.

             

            Once the EC is complete, move all the files back to production folder.

             

            I might be way off, but I haven't put too much thought into it lately.

            • Re: (Dispatch) How to apply a variable value from a file to all files that it contains
              Tom Helsley

              I was trying to do the same thing for something very similar.  My solution wasn't to read a variable from the ECN and apply it to the other files, but to use a dispatch script that triggered before the transition.  The dispatch script first prompted the user for the ECN number (before the all documents block start), then applied it to all the documents (after the block start).  The image below shows this better than I can explain...

               

              Dispatch Script - Apply value to multiple files.png

              It's not as great as reading the value from one file an applying to others, but it is the next best thing.

               

              I hope this helps.