December 1, 200817 yr Hi all, Our student database has 7 digit student numbers. The first two digits represent the year eg. In the number 9876555, 98 represents the year 1998. In the number 0129292, 01 represents the year 2001. Now I need to include the 19 or 20 (ie the full year) to these existing numbers so that: 9876555 becomes 199876555 0129292 becomes 200129292 How do I do this?
December 1, 200817 yr Use this calc into the replace field contents: Let( firstDigit = Left ( student number ; 1 ) Case( firstDigit ; 19 & student number ; 20 & student number ) ) Note: do this on a backup copy of the DB because that operation isn't UNDOABLE
December 1, 200817 yr Author Thanks Daniele, But this doesn't work: an operator is required where you have "Case". In addition, what is firstDigit? Is this supposed to be a field? Filemaker is asking for a field. Sorry I'm not good at functions/calculations so I don't understand this. Could you explain further and more simply? Use this calc into the replace field contents: Let( firstDigit = Left ( student number ; 1 ) Case( firstDigit ; 19 & student number ; 20 & student number ) ) Note: do this on a backup copy of the DB because that operation isn't UNDOABLE
December 1, 200817 yr Pardon, I forgot a ";" Let( firstDigit = Left ( student number ; 1 )[color:orange]; Case( firstDigit ; 19 & student number ; 20 & student number ) )
December 1, 200817 yr Author Great work Daniele!! Works perfectly. Thanks very much..and thanks also for the quick replies. cheers.
Create an account or sign in to comment