Hello Epidata Listers.
My colleague and I are new to the data entry development game and can't figure out the string functions. Our study id is a combination of one letter and 3 numbers. I'd like for the letter to always be capitalized. It seems that the following might be appropriate somehow:
function Upper(S: string): string Returns a string containing the same text as S, but with all letters converted to upper case.
but I don't understand how it works. Where do I put the function? Do I replace "S" with the variable name "id"? I've tried several variations but since I don't understand the logic, I don't know how to debug my syntax errors.
I'd appreciate any help you could give!
Thanks, Kristine
------------------------------------- Kristine Hopkins, Ph.D. Population Research Center 1 University Station, G1800 Austin, TX 78712 ph: 512.471.8313 fax: 512.471.4886
Hi Kristine;
If your ID combination is 5 spaces long, combining letters & digits, the most convenient way is to use an alpha-upper case field in the data entry questionnaire:
It should look like that: Id: <A > (the '<' opens a string field, the 'A' will transform any letter to the corresponding upper case, folloyed by 4 spaces (so 5 characters can be entered; put more if needed), and the '>' closes the field.
With this field, 'AaAaa' will be stored as 'AAAAA', 'A234a' will be stored as 'A234A'...
Hope this will help! Gilles ______________________________________________ Gilles DELMAS Institut de Veille Sanitaire Dept. Maladies Infectieuses, Unité infections entériques, alimentaires et zoonoses 12 rue du Val d'Osne 94415 Saint-Maurice cedex - France + 33 1 41 79 67 27 g.delmas@invs.sante.fr ______________________________________________
-----Message d'origine----- De : epidata-list@lists.umanitoba.ca [mailto:epidata-list@lists.umanitoba.ca] Envoyé : mercredi 10 janvier 2007 01:10 À : epidata-list@lists.umanitoba.ca Cc : Catherine McNamee Objet : [EpiData-list] String functions
Hello Epidata Listers.
My colleague and I are new to the data entry development game and can't figure out the string functions. Our study id is a combination of one letter and 3 numbers. I'd like for the letter to always be capitalized. It seems that the following might be appropriate somehow:
function Upper(S: string): string Returns a string containing the same text as S, but with all letters converted to upper case.
but I don't understand how it works. Where do I put the function? Do I replace "S" with the variable name "id"? I've tried several variations but since I don't understand the logic, I don't know how to debug my syntax errors.
I'd appreciate any help you could give!
Thanks, Kristine
------------------------------------- Kristine Hopkins, Ph.D. Population Research Center 1 University Station, G1800 Austin, TX 78712 ph: 512.471.8313 fax: 512.471.4886
participants (1)
-
epidata-list@lists.umanitoba.ca