3 Replies Latest reply on Aug 5, 2011 8:50 AM by Tim Read

    Pull the next P/N via a Dispatch Action?

    Brian Dalton

      I'd like to create a Dispatch action to copy a part file but give the part a new number (the next one in the Serial number) and change the filename to match that new number.  Copying and renaming seem straight forward, but I can't see how to get access to the Serial number from Dispatch...

       

      Thx.

        • Re: Pull the next P/N via a Dispatch Action?
          Tim Read

          Hi Brian,

           

          Simple answer: You can't :-( You need to write an Add-in to access the serial numbers.

           

          However, if you are setting the part number on the datacard then it should automatically get the next part number when it is added to the vault (copied). You may need to check it in the to get the serial number applied.

           

          Now, I don't think you can achieve the renaming in the same Dispatch script because the file you just created is not selected. There may be a way but I have not found it (Get File?).

           

          You could always add a second Disptach that triggers after Checkin and use that to rename the file.

           

          Tim

          • Re: Pull the next P/N via a Dispatch Action?
            Andries Koorzen

            Hi Brian... Copy the file using edpm dispatch. Make sure that the default value of the a variable on the data card is that of the serial number.

             

            This will result in a new number being generated.

            Get the value of this variable in dispatch (you'll have to execute a custom program to do this... only if you have programming knowledge) and rename the file with it.

             

            Regards

             

            Edited: If you don't have any programming knowledge, this might be a tough one to solve

              • Re: Pull the next P/N via a Dispatch Action?
                Tim Read

                This is pretty much what I suggested except you don't need a custom program - you can use Dispatch to do it but not in one Dispatch script...

                 

                1. Filecard sets part number from serial number

                2. Dispatch script copies part and adds it to the vault

                3. Second Dispatch script is triggered by adding file to vault (after add) that renames the file based on its serial number and checks it in.

                 

                Regards,

                Tim