Hi,
there are some issues in your sample
1.
<p><strong>"</strong>{INSERTANS:647177X313X26143}"</p>
<p> of "PHR14A.shown" </p>
<p> of "Q3fA3.shown" </p>
a. You use this "stone age" INSERTANS. You see here the SGQA code is used,. But this code - as it is just an autoincrement value in the database - changes when you import the lss.
b. PHR14A is missing (minor)
c. Q3fA3 is not a real QCODE. Q3f is an array(numbers); you have to address both dimensions of subquestions. So the QCODE consists of QUESTIONCODE_SUBQUESTIONCODE-Y_SUBQUESTIONCODE-X.
2.
{if(Q1_SQ001 == "A3", Q1_SQ001.shown, "")}
{if(Q1_SQ002 == "A3", Q1_SQ002.shown, "")}
{if(Q1_SQ003 == "A3", Q1_SQ003.shown, "")}
In your sample there is no question Q1.
3.
{join(if(Q3f_SQ001 == 'A3', Q3f_SQ001.shown, ''),
Here you handle Q3f as a normal array question. The answer of subquestion SQ001 is 'A3'
But as said before you want to know the answer of the cell Q3f_SQ001_A3.
As I wrote before
If you are not sure, activate a small test survey, enter some data and have a look at the answer table.
You will see this
You see the correct QCODE in the header AND you see that in an array(number) selected items are stored as "1"
Furthermore you see here that to display the text of the "Other" options you have to addrress thes3e fields
And at last:
What do you want to display?
Obviously not the "1" of the selected cells, but the t4ext of the subquestion.
Please here you see
"shown" is the display value of the answer options of a (coded) question.
Example:
Single question {Q1}
1: Adam
2: Bert
3: Charles
So if a respondent selects 2,
{Q1} returns '2'
{Q1.shown} returns 'Bert'
And "question" returns the question text.
In questions without subquestions the question text, in question with subquestions the subquestion text.
And this is the crucial point.
You have to adress the cell - and get back the question text of the cell, like
The "Others" are fine.
So, what to do?
You may use some stringfunctions to remove the not wanted part of thequestion text.
Just use only the substring from the beginning to the start of '[...]',
Something like
substr(Q3f_SQ001_A2.question,0,strpos(Q3f_SQ001_A2.question,'
On the other side it may be more convenient to hard code the items, like
if(Q3f_SQ001_A2==1,'This is my first item',''),if(Q3f_SQ002_A2==1,'This is the second item','')
Joffm
And please, be more precise
but the first question in the group 1 be an array question
It is not an array, but an array(numbers).
In this case the difference is really important, it's one dimension more.