2 Replies Latest reply on Sep 18, 2014 3:49 PM by Jeremiah Davis

    Preventing Duplicate Filenames

    Matthew Miller

      Basically I am trying to create a part numbering system and prevent users having the ability to create numbers which are already used or incorrect.

       

      I have my templates set up as I want.  It will basically take the project number folder card variable "123456" and add it to the "serial number" data card variable "001" resulting in the part number "123456 001".  The "001" part will be manual user input.  This is for many reasons and has to be this was, I cannot use a automatic serial number but I won't go into this in detail.  The problem is if a user creates two parts and they are both given the "001" suffix, windows will not say "the part already exists", it will literally add another number to the end so what I end up is "123456 001" "123456 0012" and so on.  I have attached a screenshot to show the issue and you will see that the "Number" variable has been assigned and yet the filename has been given a different number as this number already exists.  I am aware that the vault will check all numbers are unique on check in "as I have this option set".  I need to know if I can prevent windows from automatically adding a suffix in the filename.  I literally want it to tell me the filename already exists, as it would if I was working in windows explorer.  Any help on this would be much appreciated.

       

      Regards,

       

      Matt

        • Re: Preventing Duplicate Filenames
          Tim Webb

          Hi Matt,

           

          Since there's really no guarantee your users will know the next available number, I can actually foresee someone creating a spreadsheet to keep track of numbers just so they can enter part numbers in your EPDM template...which is kinda funny actually. I have seen this before, for real.

           

          I do see what you are after and empathize with your situation but I think you're putting a lot of effort into something you can't directly/feasibly control, something that will need to be configured on each user machine, and isn't a guaranteed solution.

           

          Besides all this, does the file name really matter that much when you can use metadata on the data card to search with? Could you name the filename something totally out of left field? Sorry, I had to ask.

           

          If the file name being the same as the part number is that important, my recommendation is to 1) assign the number automatically (I know you said you couldn't) or 2) run a serial number addin to assign the number automatically so the file name stays clean.

           

          I may be way off base here and missing a much easier solution so maybe someone else has a better approach.

           

          Tim CEPA

          http://www.equivaq.com

            • Re: Preventing Duplicate Filenames
              Jeremiah Davis

              Hello Matt,

               

              I like Tim's approach.  But I also ask, does the file need to have the serial number immediately assigned or can it be assigned during the first state change in the vault? In other words, could you do something during the first transition (maybe In Design -> Pending Approval) where the serial number is added to the data card and the file is renamed to match this serial number?  This would allow for some automation in the serial number generation or at the very least, a check to see if the manually entered serial number is in fact unique prior to continuing through the process.