R: [Zope] Integer on portal_catalog.searchResults

TrashMan trashman@httconsulting.com
Thu, 17 Jan 2002 12:58:56 +0100


Sorry but.....i try in several ways and.....i've the same error all the
times!

:-((

Sigh!

Massimiliano

-----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