March 1, 200421 yr Hi everybody! I've been browsing this group for quite a while and I've always found lots of useful information. I still consider myself to be a newbie, though. Hence my question: I have a database where one of the fields describes a filename fpr a jpg-file. This field is made up of parts of other fields in the same record (category, subcategory, date, etc.). So I use a calculation to generate this filename. The filenames can look something like "ALIBEC01REF010204.jpg" Is there a way I can check that the generated name is unique? If I choose the field type to be unique, I get lots of errors while entering the information. Can I validate the field? Any help on this matter would be greatly appreciated! Per-Otto Mexico City
March 1, 200421 yr I Per-Otto, If your calclulation is indexed... Create a global text field. Create a self-join relationship that has the global text field on the left and the calculation on the right. Create a number calculation that looks like: Count(self-join relationship::filename) When you create a new record, insert the candidate filename into the global - if the filename already exists, your Count calculation will show a positive value and you can act accordingly.
March 2, 200421 yr Author Thanks! One problem, though... the number calculation, should it really look like count(sjrelation::filename)? or should i replace the "filename" with a fieldname?
March 3, 200421 yr Author Thanx! It seems to work, I get instances, however, when my field dupecount, which holds the count(ctrack::value) already has a 1 as a result, even though I'm working with the first record of the database (the db is otherwise empty). Is this an error or should I do a check for the case when dupecount>1? Thanks so much for your help!
Create an account or sign in to comment