6 Replies Latest reply on Nov 2, 2012 6:32 PM by Karen Brunke

    EPDM Newbie - How do I require a filename checking to a variable value before checkin

    Karen Brunke

      First of all, I am a newbie to EPDM, so I apologize for what will certainly be a string of silly questions as I try to implement it.  I promise to get better and pose really challengine questions in the future.

       

      I would like to REQUIRE a filename to start with a variable defined in its datacard (from the folder datacard) before the file can be checked in to EPDM.  The files can be saved in the folder for temporary used, but if not named properly, cannot be checked in.  I cannot figure out how to validate the filename with a variable OR how to require it for checkin but not enterring the workflow or saving. 

       

      The variable PROJ NUM is defined in the folder template as 12345.  Each file that is CHECKED IN to EPDM from that folder should start with 12345.  However, you can save things not yet having that naming convention to the folder (such as downloaded files, etc.).  If there is a way to get SWX to automatically name each file with that prefix, that would be an added bonus.  A create new part would yield 12345 Part1 at save into this folder instead of Part1.

        • Re: EPDM Newbie - How do I require a filename checking to a variable value before checkin
          Tim Webb

          Hi Karen,

           

          This is a very good forum where gurus can relate to newbies so you are in good hands. The only silly questions are ones not asked.

           

          Option A

          1. I recommend not focusing on the filenaming convention as the primary issue and go straight to making your EPDM template create not only the new folder with serial number but also a blank .sldprt & .pdf with serial number.
          2. Then you can create a dispatch to do a filename check against the data card variable value upon checkin and if they don't match, cancel the epdm checkin command.

           

          Option B (#1 below is what we do)

          1. Let all files get checked in to an "initiated" state, allow users to rename, delete, add, check out/in but this "initiated" state is not part of a workflow cycle but once the file enters the cycle, can't be deleted or renamed without admin intervention.
          2. Then you can put conditions on the workflow transition to disallow any files to transition through unless they begin with 12345 or whatever. This one gets a little tricky if you have to match every file dynamically against their specific data card variable values.

           

          Option C

          1. Create an addin to manage this part of your workflow

           

          Are any of these even remotely close to a concept you are hunting for?

           

          Best regards,

          Tim

          • Re: EPDM Newbie - How do I require a filename checking to a variable value before checkin
            Faur Arama

            Karen,

             

            Maybe there is a solution if folder name contains the project number. If that I think you could combine Tim solution B with a dispatch action.

            In dispatch you can read "Name of current folder" and you can create a variable with this and ca obtain with a left function, let's say, the first for characters from folder name. With the same method but using "Name of selected file" you van obtain the first n characters from file name. Compare those two variables and if it's false you can send a message to the user. I know that it is not an elegant solution but otherwise I think that you need an addin to resolve that.