4 Replies Latest reply on Dec 3, 2015 10:53 AM by Elaine Nelson

    Can I read from a text file and put the data into a dispatch variable?

    Elaine Nelson

      Hi,

       

      Can anyone tell me if it is possible to create a text file (or any kind of file) with a dispatch and then read data from that file and use it in a dispatch variable?

      I am looking for a way to take out a serial number and use that to rename an existing file.

       

      Thanks,

        • Re: Can I read from a text file and put the data into a dispatch variable?
          Prasad Bhonsule

          Hi Elaine, I haven't tried this myself (but will go and do now, since I am curious )

           

          However, why the need to take a serial number out of a file, and not using the serial number capabilities inside EPDM?

           

          Kind regards,

           

          Prasad

            • Re: Can I read from a text file and put the data into a dispatch variable?
              Elaine Nelson

              Hi Prasad,

               

              Thanks for the reply and checking this out for me.

               

              I am trying to do this because we use a different numbering systems during the engineering and experimentation phase then we do for production. If a part makes it to production it gets a different part number. This number could have any of about 20 prefixes which will each use a different serial number.

               

              I am using the serial number capabilities of EPDM but pulling a serial number after a part has already been checked in is presenting a problem. I would use rename in a dispatch but there is no way I know of to pull a serial number with dispatch.

               

              As a work around for this I am trying to use Generate parameter file in a dispatch to generate a text file. I thought I could use the template card for the text file to pull a serial number based on the prefix I need. Then I was going to use a workflow transition to get the serial number into the data card of the part for which I need the new number.

               

              However, this doesn't seen to work because I can't figure out a way to direct the new serial number into the correct part data card. So my next thought was to put the serial number into the text file, read the serial number from the text file and set it to a dispatch variable that I could put into the part's data card with Set card variables.

               

              So, I need to know if there is a way to read the serial number from the text file so I can get it into the dispatch variable.