Hello, we are trying to create 2 dynamic lists referring to one another. The first one, namely NewEqtWTPDyn is constructed with taking its members from the answers of the desirability questions. ItemList2 stands for the list that Desir questions are referring whether the participant is interested or not interested in that particular item. For example, in Desir1 question, we are asking participant if he/she is interested in the first item in ItemList2. In Desir2, the second item in ItemList2, and so on. The code of the list is as follows:
Begin Unverified Perl
if (GETVALUE("Desir1") == 2)
{
ADD("ItemList2",1);
}
if (GETVALUE("Desir2") == 2)
{
ADD("ItemList2",2);
}
if (GETVALUE("Desir3") == 2)
{
ADD("ItemList2",3);
}
if (GETVALUE("Desir4") == 2)
{
ADD("ItemList2",4);
}
if (GETVALUE("Desir5") == 2)
{
ADD("ItemList2",5);
}
if (GETVALUE("Desir6") == 2)
{
ADD("ItemList2",6);
}
if (GETVALUE("Desir7") == 2)
{
ADD("ItemList2",7);
}
if (GETVALUE("Desir8") == 2)
{
ADD("ItemList2",8);
}
if (GETVALUE("Desir9") == 2)
{
ADD("ItemList2",9);
}
if (GETVALUE("Desir10") == 2)
{
ADD("ItemList2",10);
}
if (GETVALUE("Desir11") == 2)
{
ADD("ItemList2",11);
}
if (GETVALUE("Desir12") == 2)
{
ADD("ItemList2",12);
}
if (GETVALUE("Desir13") == 2)
{
ADD("ItemList2",13);
}
if (GETVALUE("Desir14") == 2)
{
ADD("ItemList2",14);
}
if (GETVALUE("Desir15") == 2)
{
ADD("ItemList2",15);
}
if (GETVALUE("Desir16") == 2)
{
ADD("ItemList2",16);
}
if (GETVALUE("Desir17") == 2)
{
ADD("ItemList2",17);
}
if (GETVALUE("Desir18") == 2)
{
ADD("ItemList2",18);
}
if (GETVALUE("Desir19") == 2)
{
ADD("ItemList2",19);
}
if (GETVALUE("Desir20") == 2)
{
ADD("ItemList2",20);
}
End unverified
Also, we selected 15 particular items in ItemList2. Then, we are trying to find if any of this 15 items are also chosen as "I'm interested"(DesirX==2) in any of the Desir questions. So we created another dynamic list, namely FinalEqtWTPDyn as follows:
Begin Unverified Perl
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",11))
{
ADD("ItemList2",11);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",14))
{
ADD("ItemList2",14);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",15))
{
ADD("ItemList2",15);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",16))
{
ADD("ItemList2",16);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",19))
{
ADD("ItemList2",19);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",20))
{
ADD("ItemList2",20);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",21))
{
ADD("ItemList2",21);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",28))
{
ADD("ItemList2",28);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",30))
{
ADD("ItemList2",30);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",38))
{
ADD("ItemList2",38);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",41))
{
ADD("ItemList2",41);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",44))
{
ADD("ItemList2",44);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",53))
{
ADD("ItemList2",53);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",57))
{
ADD("ItemList2",57);
}
if (LISTHASPARENTMEMBER("NewEqtWTPDyn",61))
{
ADD("ItemList2",61);
}
RANDOMIZE
End Unverified
Then, we are trying to reference a random member of this list by referring to it in a question with the code:
[%ListLabel (FinalEqtWTPDyn, 1)%]
BUT IT DOESNT WORK! We're trying to figure out the problem for several hours with nothing came up. Are there anyone to help us on this issue?
Huuuge thanks in advance!
Can