1 Reply Latest reply on Nov 6, 2008 1:39 PM by Christina Seay

    Dispatch Question...

    Christina Seay
      I'm not sure if PDM API questions belong in the PDM forum or the API forum...

      I have created a dispatch action that copies a file from folder to another when a file is added to the vault... and it works fine... but does anyone know if there is a way to have it only copy that file if a variable on the card of the file being created is "Yes"??
        • Dispatch Question...
          Christina Seay
          Ok... I figured this out if anyone else is interested... What I'm doing is if the variable on the card says "Yes", then I'm popping up a message box to confirm if they want a checklist, I'm also asking for a Job Number and renaming the checklist to JobNumber.doc and checking in the file after it's copied... You have to set the dispatch actions like this to do this:

          1. For All Documents Block START
          2. Jump If = Yes NO_CASE THEN GOTO ShowYesNoMessageBox
          3. Jump If %TopLevelDrawing%=No NO_CASE THEN GOTO EndProgram
          4. Label ShowYesNoMessageBox
          5. Yes-No Message Box CheckListNeeded = YES || NO
          6. Jump If %CheckListNeeded%=Yes NO_CASE THEN GOTO CopyFile
          7. Jump If %CheckListNeeded%=No NO_CASE THEN GOTO EndProgram
          8. Label CopyFile
          9. Edit Box Job Number
          10. Get File %RootFolderPath%\CheckLists\DrumEngineerChecklist.doc
          11. Copy File %RootFolderPath%\CheckLists\DrumEngineerChecklist.doc => %CurrentFolderPath%\
          12. Rename File %CurrentFolderPath%\DrumEngineerChecklist.doc -> %JobNumber%.doc
          13. Check in file %CurrentFolderPath%\%JobNumber%.doc
          14. OK MessageBox Checklist was copied to %NameOfCurrentFolder% successfully!!
          15. Label End Program
          16. End for all documents Block END