setting legal values

Dear All,
I have been facing the following issue...
i got 2 protocols A and B
In A protocol I perform a database query using the ODBC select which values are stored in a global property @result, initializing the WebExports parameter of the implementation tab to result.
in the protocol B I would like to initialize legal values from the results obtained from protocol A.
to do this, i create a protocol parameter named values in B and in the Legal Values Script tab i inserted:

@myResult:=RunProtocol('getOLPTID');

resize(lvals,numvalues(@myResult));

for #i in 1 .. numvalues(@myResult)

loop

lvals[#i]:=@myResult[#i];

end loop;

SetLegalValues(lvals);

the strange thing is that on Pipeline pilot client value is correctly intialized showing to me the list of values retrieved, but no more if accessing to the same protocol from the web interface.
have you any idea on what is going worng?
regards,
Pasquale