Hi,
I am trying to set up a hidden matrix question with 7 columns and 4 rows. The 7 columns can simply be 1 to 7, and the four rows are options 1 to 4.
So the script I am trying to develop, will write 4 hidden values matching each of the options 1 to 4, which will appear as ticked in each row in the matrix questions.
The skus for the 4 options are 201, 202, 203 and 204. The 4 values I want to write to each one is 2, 3, 7, and 5. I started with
%%skus[]=201;
%%skus[]=202;
%%skus[]=203;
%%skus[]=204;
and I know the loop part starts with
foreach (%%skus as %%sku){
I guess I need to use SgapiSetValue, but I don’t know how you refer to each sku in SpagiSetValue within loop. So I don’t know exactly what I should write into the loop part so the value for each sku will be 201 is 2, 202 is 3, 203 is 7 and 204 is 5.
Could you please provide some advice on this? This is for a question that is not asked in the survey, but will need to be exported as a part of data for analysis. Moreover, different versions (branches) of surveys will have 4 different numbers for 201 to 204, that part I can deal with using if condition in script to control (just create multiple loops based on version).
Sorry I could not find anything in the forum for this neither I can find any documentation relating to this level of scripting on sku. I will be really appreciated if you can help.
Thanks
Scott