chzboi Posted January 18, 2006 Posted January 18, 2006 Is there a way to auto enter alphanumeric characters for newly created records instead of numbers? For example, instead of auto entering serialized numbers i.e. "0001, 0002, 0003" etc... for each new record you create, you would get "A, B, C" etc. This seems like it would be easy but cant seem to figure it out. Any help is much appreciated!!!
Ender Posted January 18, 2006 Posted January 18, 2006 I suppose you could build an auto-enter calculation that does this, but what happens after Z?? I'd stick with the numbers.
Raybaudi Posted January 19, 2006 Posted January 19, 2006 Hi you can start from this type of calculation in an AutoEnter text field: Substitute ( Get ( TotalRecordCount ); [1;"A"]; [2;"B"]; [3;"C"]; [4;"D"]; [5;"E"]; [6;"F"]; [7;"G"]; [8;"H"]; [9;"J"]; [0;"O"] )
Ender Posted January 19, 2006 Posted January 19, 2006 Hmm, it's not safe to use total record count for this, as that could produce duplicates if records are ever deleted.
comment Posted January 19, 2006 Posted January 19, 2006 (edited) You could keep the serial number field as a generator, and use this custom function in a calculation field to convert the output to an alphabetic (not alphanumeric) representation. ---EDIT--- The link above points to a REAL CUSTOM FUNCTION. It's NOT one of those automatically generated whenever you type custom functi... Edited January 19, 2006 by Guest
Ender Posted January 19, 2006 Posted January 19, 2006 You could keep the serial number field as a generator, and use this custom function in a calculation field to convert the output to an alphabetic (not alphanumeric) representation. That's kinda what I was thinking, but we'd still need to know what comes after Z in order to build it.
comment Posted January 19, 2006 Posted January 19, 2006 Ahmm.. I think you've missed the point (those damned auto-links again): I have already build it. If poster wants something else, he'd need to chime in.
chzboi Posted January 19, 2006 Author Posted January 19, 2006 Ok here's the deal. I need the auto enter alphanumeric as a version number field. Rarely will our version numbers go beyond say "E" so running out of letters is not an issue. Unfortunately I'm now realizing that what I need is a little more complicated. What I need this auto enter field to do is to be specific to a portal record, and residing in the portal table. So for each new portal record, the field would move on down the alphabet. If I create a new record in the main table it would start over again. I've played around with using Globals and some Case scripts and I’m close but not quite there yet. Thanks for your above responses. Any additional help is greatly appreciated, thanks!
chzboi Posted January 19, 2006 Author Posted January 19, 2006 Got it!! Its complicated and I’m thinking there's probably a much better way to do this.. but it works. Had to create a duplicate relationship with no creation of records on a different layout, then used a global to set the last used letter in the portal. Then moved back to the original layout with the original relationship and created new portal record, set field with calc based off global, fun stuff!
Recommended Posts
This topic is 6946 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now