[Zope] Solved: Trouble with multiple selection property from SQL method

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


Never mind, I'm a user=id10t (and also newbie)

I started browsing the postings on the list and 
found:

http://lists.zope.org/pipermail/zope/2000-February/017895.html

This gave me a hint in the right direction. Now my
user_list_meth reads:

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

<dtml-let list="[]">
<dtml-in user_list_sql>
    <dtml-call "list.append(name)">
</dtml-in>
<dtml-return list>
</dtml-let>

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

I'm so happy ;-)

Sorry to bother you!

Still struggling with the concepts (and a lack of complete 
documentation). 

Greetings,

Michiel Toneman


On Fri, 11 Feb 2000, Michiel Toneman wrote:
> 
> 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."