when you define the fields of you data table, you can enter some check conditions. Either by some pre-defined conditions, or you can enter a formula that cheks length, first character, next seven charcters. And then this formula tells ok or not ok.
greetings from germany
Could you be a bit more specific or give an example for A0000001 Like how do I force first character to be single cap? I have set validation to: Char ( 8 )
you have to repeat the last if for all 7 num characters and to complete the abc characters.Wenn ( Länge ( meinfeld ) = 8;Wenn ( länge (FilterZeichen ( ZeichenMitte ( meinfeld ; 1; 1); "abcdefghij")) > 0; 1; 0) UNDWenn ( länge (FilterZeichen ( ZeichenMitte ( meinfeld ; 2; 1); "0123456789"> 0; 1; 0) UNDWenn ( länge (FilterZeichen ( ZeichenMitte ( meinfeld ; 3; 1); "0123456789"> 0; 1; 0); 0)greetings from germany
it is a unique identifier
it's better leave the creation of unique identifiers to FileMaker.
If the first letter is always "A" you can set the field to auto-enter a serial number starting from A0000001 step 1
Thanks for the string but can't get it to work - may be my English translation.
The unique identifier is generated by the hospital wide demographics database and is unique for each patient - It is already assigned to a patient by the time I deal with them so cannot generate it in FMP.
Try validating the field by calculation =
Let ( [
char1 = Left ( Self ; 1 )
not IsEmpty ( Filter ( char1 ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) )
Exact ( SerialIncrement ( char1 & "0000000" ; Self ) ; Self )
Just to add the first charachter can be A to Z , the next 7 are numbers. eg B1234567 or C5763988
In access you just put an input mask in the form L0000000 seems FMP doesn't have an option like that