[Zope] Trouble with multiple selection property from SQL method

Michiel Toneman toneman@phil.uu.nl
Fri, 11 Feb 2000 13:23:24 +0100 (CET)


Hi all, 

This problem has me stumped :( 

I'm trying to fill the fields of a multiple
selection property with a database table.

My SQL method looks something like:

user_list_sql------------------
-------------------------------

SELECT name FROM users_tmp 
  WHERE status = 'a'

-------------------------------

So I make a multiple selection property "users"
that takes user_list_sql as value. This gets me
the Zope error

Error Type: TypeError
Error Value: 'in' or 'not in' needs sequence right argument

Ok, so having succesfully used a lines property to fill the 
fields, I create a method that does something similar:

user_list_meth-----------------
-------------------------------

<dtml-in user_list_sql>
<dtml-var name>
</dtml-in>

-------------------------------

Now I use user_list_meth as value, and get the error:

Error Type: InError
Error Value: Strings are not allowed as input to the in tag

How do I tell the multiple select property "I'm feeding you
newline separated text" or someting like that...

Any suggestions?

Thanks,

Michiel Toneman

-- 
From a Sun Microsystems bug report (#4102680): 
    "Workaround: don't pound on the mouse like a wild monkey."