Custom Primary Key

Hi All,

I’m in the process of converting a Filemaker solution that generates primary keys like:

05C0001
05C0002

The idea behind these kind of keys are giving just a little valuable info to the user:

05 => is from year 2005
C => is a credit note
0001 => is credit note unique ordinal number (key)

I would like to keep on using this primary key format for a number of reasons. But Servoy doesn’t accept characters in it’s primary keys - they are allways integers.

I know I can make these managed from the database (firebird is the most likely candidate), but in order to keep the solution database agnostic I would really love to accomplish this from Servoy. Is there a way to make this in Servoy?

Txs,

Miguel

Servoy requires an int for the pk. However, you could always use another column for a computed key with whatever you want.

bob cart:
Servoy requires an int for the pk. However, you could always use another column for a computed key with whatever you want.

I see. If I use the key in the calculated column the I can garantee it’s uniqueness. Great solution!

Txs,
mjekl

Just remember that some servoy functions work on the actual PK. As long as you keep that in mind, it should work fine.

Thanks Bob for all the help.

Miguel