Concatenate or prefill function problem
Concatenate or prefill function problem
In CSPRo i am building a questionnaire and I have variable i.e. District Code, Chiefdom Code, and Village Code. When I input these codes in this different variables, I want the next variable to contain a combination of all three variable as an ID to that interview
-
- Posts: 1805
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Concatenate or prefill function problem
If you are fine with the next variable being a string, you can define it as alpha in the dictionary, and then in the preproc of that field:
PROC FIELD4
preproc
FIELD4 = maketext("%v%v%v", FIELD1, FIELD2, FIELD3);
"%v" formats those fields using the formatting parameters defined in the dictionary.preproc
FIELD4 = maketext("%v%v%v", FIELD1, FIELD2, FIELD3);
Re: Concatenate or prefill function problem
Hi Gregory,
I am still having trouble getting this right.
I created a new variable called EIN that I want it to hold these values but it's not working for me
I am still having trouble getting this right.
I created a new variable called EIN that I want it to hold these values but it's not working for me
-
- Posts: 49
- Joined: October 15th, 2020, 3:40 am
Re: Concatenate or prefill function problem
Is your EIN variable numeric or string. If it is numeric convert it to string. Than try using this logic.