[Zope] Solution: Integer on portal_catalog.searchResults
TrashMan
trashman@httconsulting.com
Thu, 17 Jan 2002 14:41:45 +0100
The solution is:
<dtml-call "REQUEST.set('number',_.string.atoi(numberpumps))">
-----Messaggio originale-----
Da: Meilicke, Scott [mailto:scott.meilicke@intp.com]=20
Inviato: gioved=EC 17 gennaio 2002 1.15
A: 'TrashMan'
Oggetto: RE: [Zope] Integer on portal_catalog.searchResults
Try it without the quotes around _string.atoi...=20
You shouldn't need them since REQUEST is already in quotes.=20
-Scott=20
-----Original Message-----=20
From: TrashMan [mailto:trashman@httconsulting.com]=20
Sent: Wednesday, January 16, 2002 4:10 PM=20
To: 'Meilicke, Scott'=20
Subject: R: [Zope] Integer on portal_catalog.searchResults=20
Invalid attribute name, "_string.atoi(numberpumps)", for tag=20
<dtml-call "REQUEST.set('number','"_string.atoi(numberpumps)"')">=20
, on line 45 of engine_view=20
I've tried all the combination.....=20
Massimiliano=20
-----Messaggio originale-----=20
Da: Meilicke, Scott [mailto:scott.meilicke@intp.com]=20
Inviato: gioved=EC 17 gennaio 2002 0.55=20
A: 'TrashMan'; zope@zope.org=20
Oggetto: RE: [Zope] Integer on portal_catalog.searchResults=20
So you can pass numberpumps as an integer with something like:=20
_string.atoi(numberpumps)=20
Maybe:=20
<dtml-in "portal_catalog.searchResults(Type=3D'engine',=20
=20
number=3D'"_string.atoi(numberpumps)"',=20
review_state=3D'published' )" =
>=20
-Scott=20
-----Original Message-----=20
From: TrashMan [mailto:trashman@httconsulting.com]=20
Sent: Wednesday, January 16, 2002 3:51 PM=20
To: zope@zope.org=20
Subject: [Zope] Integer on portal_catalog.searchResults=20
Hi,=20
I want to do a search on the portal_catalog where a key is an=20
integer....but.....i don't find the solution!=20
If i do=20
<dtml-var numberpumps>=20
I have=20
32500=20
If i do=20
<dtml-in "portal_catalog.searchResults(Type=3D'engine',=20
number=3D'numberpumps',=20
review_state=3D'published' )" =
>=20
...=20
</dtml-in>=20
I found all the engine-object.=20
The problem is i pass to searchResults '32500' and not 32500=20
I've tried with=20
<dtml-call REQUEST.set('Type', 'engine')>=20
<dtml-call REQUEST.set('number', numberpumps)>=20
<dtml-in "portal_catalog.searchResults()">=20
...=20
</dtml-in>=20
But i've the same results!=20
Pratically number in REQUEST is a string and not an integer!!=20
Do you have some solutions??=20
Thanks=20
Massimiliano=20
_______________________________________________=20
Zope maillist - Zope@zope.org=20
http://lists.zope.org/mailman/listinfo/zope=20
** No cross posts or HTML encoding! **=20
(Related lists -=20
http://lists.zope.org/mailman/listinfo/zope-announce=20
http://lists.zope.org/mailman/listinfo/zope-dev )=20
The information contained in this email message may be privileged and is
confidential information intended only for the use of the recipient or=20
any employee or agent responsible for delivering it to the intended=20
recipient. Any unauthorized use, distribution or copying of this=20
information is strictly prohibited and may be unlawful. If you have=20
received this communication in error, please notify the sender=20
immediately and destroy the original message and all attachments from=20
your electronic files.=20
The information contained in this email message may be privileged and is
confidential information intended only for the use of the recipient or
any employee or agent responsible for delivering it to the intended
recipient. Any unauthorized use, distribution or copying of this
information is strictly prohibited and may be unlawful. If you have
received this communication in error, please notify the sender
immediately and destroy the original message and all attachments from
your electronic files.