James Chung 0 Posted July 17, 2007 Hi, I am new here. Could anyone tell me how to write the scripts that generate the serial numbers from “1” everyday? For example, “20070717-001”, “20070717-002”, “20070717-003”, “20070718-001”, “20070718-002”, “20070718-003” and so on. (2007 is the year, 07 is the month, 17 is the day. and the -00X is the serial numbers.) Thanks Quote Share this post Link to post Share on other sites
Raybaudi 58 Posted July 17, 2007 Hi give a look at this custom function: http://www.briandunning.com/cf/386 Quote Share this post Link to post Share on other sites
James Chung 0 Posted July 17, 2007 Thank you so much, you save my life. Best Regards, James Quote Share this post Link to post Share on other sites
comment 1,488 Posted July 17, 2007 The usual warning: http://fmforums.com/forum/showpost.php?post/258882/ Quote Share this post Link to post Share on other sites
James Chung 0 Posted July 19, 2007 Thank you for your help. Could you make a sample for me so that I can understand this function more. Because this is the first time I am using this function. Best Regards, James Quote Share this post Link to post Share on other sites
JesseSFR 0 Posted July 19, 2007 James, I would definitely heed comments warning because you could be opening a can of worms for yourself. If you can, just stick with the serial number approach. Quote Share this post Link to post Share on other sites
Raybaudi 58 Posted July 19, 2007 Ok, this is an example. N.B. the Id number must be generated by FileMaker and it is the lonely that you have to use for relationshipsDailySerial.zip Quote Share this post Link to post Share on other sites
James Chung 0 Posted July 19, 2007 Thank you for your fast responses and help again. I am starting to understand this function and your help is very useful. But if I want to put some fixed letters in front of it with "-" and with "-" plus 3 digits, what should I do? For Example, [color:red]ABC-20070720[color:red]-001.(ABC- is the fixed letters, 20070720 is the current date, and -001 is the daily number.) PS: if is possible, could you explain how you control those parameters more. Because I am not so sure that my comprehension of the parameters that you use in this function is correct or not. I am sorry to trouble again and thank you for your great help. Best Regards, James Quote Share this post Link to post Share on other sites
Raybaudi 58 Posted July 20, 2007 OK Here there is a modified version for your problem. The CF now has a prefix parameterModifiedDailySerial.zip Quote Share this post Link to post Share on other sites
James Chung 0 Posted July 20, 2007 :laugh2: Thank you so much. You are the great. Sincerely, James Quote Share this post Link to post Share on other sites