0 Replies Latest reply on Jun 1, 2007 4:56 PM by Gerry Charest

    Dispatch Semi-Static variable

    Gerry Charest
      I'm attempting to create a Dispatch Action to move a file to afolder outside of PDMWE.  No problem here, the difficulty iswith the file name.  I need to have unique file name for eachfile/time a document is moved.  

      I have set up an Environment variable "TempFIleName" toconstruct a string consisting of the current date and time. In the first part of the dispatch I copy the file to the newarea and give it the new name (I'm also a little confused asto how to add the file extension dynamically. No position functionin the syntax guide).  The file name goes inas 20070501102431 without a file extension for now.  

      The next step in the dispatch is to create a parameter filecontaining my data for the external processes. This includes thevalue of TempFileName.  Using the same variable in two placeswithin the dispatch I would expect it to have the same value. This does not appear to be the case. The TempFileName valueevaluates each time it is used.  So the value in the ParameterFile is slightly off, 20070502202435, for example.

      Does anyone know how to have the variable evaluate onlyonce?   

      This is the current setting for the selected variable:
      Name: TempFilename  
      Type: Value of environment variable
      Environment variable:  CurrentTime(%%Y%%m%%d%%H%%M%%S)


      Regards
      Gerry