August 14, 200718 yr Does anyone know of a way to serially increment text? For example, if a field contains the value of "A", incrementing it would result in "B". A value of "B" would increment to "C", etc. I haven't found any built-in text functions to handle this, and would like to avoid having a table to store replacement values.
August 14, 200718 yr What increments the field: script, another field? What happens when you reach 'Z', start over at 'A'?
August 15, 200718 yr Author It would increment via script. It is not expected that it would need to increment beyond "Z". Since I needed to get something done pretty quickly, I ended up using a related table to store replacement values. IE: the original table only stores a number, but the related table has an alpha value for each number. Not the most elegant solution, but it works. I'd still ike to know if there's a way to increment text via script, though.
August 15, 200718 yr Use a serial number field like normal and a calculation for the "Serail Text" MySerialText = Middle ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; MySerialNUMBER;1)
August 15, 200718 yr and you could get away from the use of a serial field if you use the position() function to find where your current letter is in the string of letters then just get the letter from the next position. Don
August 15, 200718 yr "It is not expected that it would need to increment beyond "Z"." Famous last words. I'd be working out now what to do when this condition eventuates.
August 16, 200718 yr "It is not expected that it would need to increment beyond "Z"." Famous last words. I'd be working out now what to do when this condition eventuates. http://fmforums.com/forum/showpost.php?post/244248/
Create an account or sign in to comment