I try to construct a list based on the answers of different previous constant sum questions. So for example:

Q1: divide 50 amongst (constant sum)

A

B

Q2: divide 50 amongst (constant sum)

C

D

predefinedlist

1.A

2.B

3.C

4.D

constructed list (add items if not equal to 0)

Begin Unverified Perl if (VALUE("Q1_1") != 0) { ADD("predefinedlist", 1); } elsif (VALUE("Q1_2") != 0) { ADD("predefinedlist", 2); } elsif (VALUE("Q2_1") != 0) { ADD("predefinedlist", 3); } elsif (VALUE("Q2_2")!=0) ADD("predefinedlist", 4); } End Unverified

But if i add the constructed list as rows in a grid-questoin, i get an Script error when testing the survey. I probably made a mistake in the script, but i cannot figure out what the mistake is. Could you maybe help me?

AIG(Q1,0)

AIG(Q2,0)