Property lists and listboxes

I have a listbox with a list of properties from a database and I want to be able to keep only the properties selected in the listbox.

Here's what I have set up:
The listbox is called List and maps the parameter List. In the work protocol I have a component Keep(@List). However, this is dropping all of my properties. Any ideas?

I've also tried
For #i in 1 .. NumProperties() LOOP
If ithpropertyname(#i) eq @List then Keep(ithpropertyname(#i);
Else Remove(ithpropertyname(#i);
End if;
End Loop;

-Jules