Hello the SuSo community !!
Simple question : I’m asking people to choose their (1) Street_name in a list (category) ; (2) City_name (another category).
I have thousands of city names and street numbers.
I wanted to create a variable to summarise the address and refer to it later doing :
Street_name + City_name
But instead of retrieving the title (Like “Howard street London”) I get the values !
How can I get the titles, please ?
Many thanks !
Ok, I sort of got an answer :
It works by refering to each variable independently using text substitution, but not if you sum them up like I did in an attempt to create a single variable that would recompose the address.
I’m still open for a better solution though !
Correct, and this is what documentation says:
For single-select categorical questions the substituted value is the option text associated with the current answer, not the numerical value, even though the latter is the value of the question in the syntax expressions (conditions).
If you construct a string variable, it no longer carries any relation to the value labels attached to the categorical variables used in its construction.
Hi @sergiy !
Thanks for the answer, I appreciate.
Is there a turn-around to this ?
Or any way to construct nice strings using the labels from categorical variables, even if that involves multiple steps ?
If not, has that been suggested as a new possible feature already ?
If I’m not mistaken, there’s no way to capture and manipulate answer option labels. See this thread for more. But you could construct a string variable that concatenates the desired information (if it’s all text). See example 1 in this article for very basic use case.