Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5729 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a 2 digit limitation, but more than 100 items. Our answer was to count 00 to 99, and then use a number/alpha combination. (ie. 99, 1A, 1B, 1C ... 2A, 2B, etc.)

I have modified the last couple of records to 1A, 1B.

How do I script that? This is wrong, but a start:

Show All Records

Go to Record/Request/Page [Last]

Set field [ COLORS_Fixtures_color_status::color_step_g; Left ( COLORS_Fixtures_color_status::color_00_c ; 1) & Right ( Filter ( "ABCDEFGHJKLMNPQRSTUVWXYZ" , COLORS_Fixtures_color_status::color_00_c +1 ; 1 ))]

Posted

Why don't you number the items using a regular serial number, then use a calculation to convert the number to a higher base:

http://www.briandunning.com/cf/218

Posted

I am not sure where I lost you. I suggested you use two fields: one with a serial number, and another to convert the number to say, base-16 or base-32. Base-16 will allow up to 256 items before requiring a third character; with base-36 you can go up to 1296.

Posted

I wasn't sure what a base-16 or 32 was. Did some research and now I know. That sounds like a great idea. We will blow past the 256 number over the next few years, so the base-32 would be the safer bet.

Now my question is how to install or set up a custom function. I have never done that before and have not been able to find a good tutorial or how-to when I have searched before. Sorry if it is a dense question, just need some help.

Posted

Since you only have two characters to calculate, you could do it without a custom function:


Let ( [

alpha = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; 

bit1 = Mod ( SerialID ; 36 ) ;

bit2 = Div ( Mod ( SerialID ; 36^2 ) ; 36 ) 

] ;

Middle ( alpha ; bit2 + 1 ; 1 ) & Middle ( alpha ; bit1 + 1 ; 1 )

)

Posted

OK, now to combine that with the right 3 numbers of the serial, would it be something like:

Let ( [

alpha = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;

bit1 = Mod ( SerialID ; 36 ) ;

bit2 = Div ( Mod ( Right ( SerialID ; 3) ; 36^2 ) ; 36 )

] ;

Middle ( alpha ; bit2 + 1 ; 1 ) & Middle ( alpha ; bit1 + 1 ; 1 )

)

Then is this just an Auto-Enter / Calculated value?

thanks

Posted

Now I am confused. Why would you want to combine this with the right 3 numbers of the serial? It's exactly the same information (at least for the first 999 items), written in two different ways - what's the point of repeating it?

Posted

OK, perhaps I am confused as to how to use this. I have 106 numbers already assigned with a serial numbers (and additional data). I need a unique 2 digit tracking for these and all the future records. That is used to populate a field in another application. That is why I thought this would be how to use what you have shown.

How were you intending it to be applied?

thanks

Posted

Have a SerialID field (Number, Auto-enter serial number). Have a calculation field (result is Text) using the suggested formula. The result of the calculation field is your unique 2-character code.

This topic is 5729 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.