September 6, 200619 yr I have a need to have a unique identifier created based on a calculation. A user needs to select a zone, which has a two-digit abbreviation. My calculation will take the zone abbv. and append a three-digit number and the first three letters of the name of the current month. The three-digit number (currently) comes from a serial number field, which increments by 1. E.G. User picks "Zone A", which has abbv. "ZA". This becomes ZA008SEP. However, at the start of each month, I need to reset my serial number counter to 001 so that next month I can have an id like ZA008OCT. What's the best way to accomplish this, preferably automatically? Cheers, Robert
September 6, 200619 yr The only bullitproof Unique ID'ing, is the one that users have absolutely no access to tamper with. What will happen to you uniqueness if the user changes his entry. Use the build in serial numbering to ensure uniqueness! --sd
September 6, 200619 yr Author I appreciate your comment, however this system of identification has worked for us for years (decades, actually) on paper. I am simply trying to digitize the process. I don't care if next September I end up with another ZA008SEP as the files associated with the previous ID will have long been deleted. So my questions stands: how do I reset my counter to 001 at the start of each month? Robert
September 6, 200619 yr Well as long it isn't going to make relations work could this method be applied: http://www.filemakerpros.com/Serialize_by_Category.zip Where the category here is the autoenter you get from this calc... Month(Get(CurrentDate)) --sd
September 6, 200619 yr Author This solution seems to me to be just another way of accomplishing what I already have (though better, I must admit), and will get me a new serial number starting at 1 each month, but it does have a problem, I think... This September I'll end up with SEP001, SEP002, SEP003, SEP004, etc., but it seems that with this solution NEXT September it will pick up at SEP005, SEP006, SEP007. What I really need it to do is start all over again at SEP001, SEP002, SEP003. Thoughts? Robert P.S. I do appreciate the help so far!
September 6, 200619 yr Well, yes while I'm astonished with the uniqueness instated ...could it be that appearance isn't everything. Instead make the category this way: Year ( Get(CurrentDate)) & MonthName (Get(CurrentDate) ) While the appearance could be Middle(theCategory;5;3) ... --sd
September 6, 200619 yr Author Now that works! Brilliant. Now I just have to copy it into my solution without screwing anything up! Thanks, Robert
Create an account or sign in to comment