Create a field unique in table CustTab

I work on a project around dynamics ax2012 , and i want to add some fields in CustTable .

I want to add a unique field that has 11 caracter consists of 4 digite

1er : 1 caracter for sexe

2: 2 caracter for year of birth

3 : 2 caracter month of birth

4 : 6 caracter this caracter should be auto- increment

How can i produce to do that , and when i create new form how can i implement this field automatically?

Any idea

Thank you

we can set the edt type as string and limit the length of the same. For strings, StringSize and Adjustment should be set on the extended data type. DisplayLength of EDT Specify a maximum number of characters to be displayed in a form or report. not sure of 4th point exactly what you meant???

Thank you for replay,

the field who has i want create is composed of 10 caracter divided into 4 components(segment /digite)

What i want is: how to produce to create unique field (cust_Id for exemple) that consisting 4 segment. for exemple if i want create new custmer, in form ,I seized sexe & date birth and other .

I want take for creating this field :

  1. Gender (1 digit)

•1 for men

• 2 for women

  1. Year of birth (2 digits)

• Are postponed the last two digits of the year

• Example: 78 for 1978

  1. Month of birth (2 digits)

  2. Order number (5 digits) auto increment

globale exemple:

Ahmed 22/03/1990 00001

when i submit the form the field contain this value : 1900300001 that is the unique identifier of new custmer inserted

thank you