List construction with Perl in a loop using LOOPVALUE

I have a survey that has a loop across two questions. The looplist being used is functioning correctly, but the first question of the loop is using a constructed list that is based on which item of the loop we are in. Below is the logic in my constructed list. The list always comes up blank and skips the looped questions as they use this list. I just added the 3 items without referencing the loopvalue and all works correctly. So, it would seem that my call of the loopvalue is not achieving the desired result. What am I missing here?

Begin Unverified Perl
if(LOOPVALUE()==1)
{ADD("Solution1Tools",1,3);}
elsif(LOOPVALUE()==2)
{ADD("Solution1Tools",1,3);}
End Unverified
4 replies