Automatically Update Unique Value
I am wondering what the mechanical makeup would be for the following situation. I have a number of records that populate a filename field. When the individual record is out put, this filename field is used to save a PDF of the record. However, I would like the value to be unique, so if a duplicate file is created it does not save over the other file. What I would like is some mechanic that would do this. I was thinking to set the validation to Unique and then having some manner of calculation to modify the filename. I suppose I would like the filename to increment based on previous versions. So if I had a file that was named "JohnDoe.pdf" I would want "JohnDoe02.pdf." I wonder if there is a more elegant or logical solution and any help would be appreciated.
There are multiple options. In one of my systems, I generate files where I append a modified timestamp to the end of the file name to ensure unique file names. But a field in your record could be incremented by 1 each time you save the PDF and that field could be part of the expression that generates the file name so this would also ensure unique file names.