Here is an extract from the Sawtooth HELP for the SetValue function ...
SetValue (QuestionName, Value)
SetValue() allows you to save values to existing variables in the database (it does not create new variables on the fly within the database). For example:
[%SetValue(Q1, 5) %]
sets the value for Q1 to 5 in the database.
Currently we do not have a place in the SSI Web interface where you can specify variable names. You could use an existing question in the question list (such as a Free Format hidden variable). But, we suggest you use Pass-In Fields (located in the Start question) to set up variables that can be used by SetValue(). For example you could create a Pass-In field named "age". You could then set the value for "age" to 45 midway through the survey using the following command:
[%SetValue(age, 45) %]
I suspect you may have an issue with your "poi variable (where you want to store the coded value)?
Go to the pass-in-field and simply define "poi" as a whole number variable.
Be careful with the naming of your variables as Perl is case sensitive. Your Perl script looks okay.
When constructing your brand list later on (assume Q5BrandList which has 1-10 codes) and you want to remove the "poi" brand from the total list, use something like this in your constructed list ...
That will work nicely.