Re: Simple ZCatalog question
Tim Cook <tim@freepm.org> writes:
Tim Moore wrote:
Tim Cook <tim@freepm.org> writes:
Tim Moore wrote:
I'm trying to query a ZCatalog for objects where a particular property (which I'm cataloging as a FieldIndex) is not empty. I can't figure out for the life of me what the syntax to do this is :-)
Been there, done that, found it in the mailing list archives. It should be a TextIndex.
OK, thanks but then what should the actual query contain? -- Tim Moore
Okay, I misunderstood the problem. Create a Z Search Interface and study the code generated to see how to query the catalog.
No, I understand the basic query syntax. What I'm trying to do is create query which returns all of the objects of type 'Timeslot' that have some non-null value for their 'archive_url' property. It's the second half of that query that I can't figure out... Catalog(meta_type='Timeslot', archive_url='???') I've tried archive_url='*', but that doesn't work. Is this even possible using ZCatalog? -- Tim Moore
Hi Zopers, I need some help about a way to "enter" inside in a folder to list it´s content. I have the complete path to this folder saved in a property of a DTML Document as a string. Example: - DTML Document id = debug - Name of the property with the path = path_atr - Value of the path_atr = 'folder1/folder2/folder3' Regarding this structure: root |----folder |----folder1 |------folder2 |--------folder3 |--------obj1 |--------obj2 |--------obj3 Now, i want to list this objects that are inside folder3. I´ve already know that i can use this form supposing i am inside the folder called "folder" <dtml-in "folder1.folder2.folder3.ObjectValues()"> </dtml-in> Now, let´s go to the problem. The value of the atribute called path_atr changes all the time and the number of levels that this path will have will also change. Ex: - Value of the path = 'otherfolder1/otherfolder2' - Value of the path = 'folder1/folder2' - Value of the path = 'folder_one/folder_two/folder_tree' So, how can i take this value and interate inside the folder correspondent to it.? Any help will be welcome Regards Rodrigo
Rodrigo Leme de Mello wrote:
Now, let´s go to the problem. The value of the atribute called path_atr changes all the time and the number of levels that this path will have will also change. Ex:
Any help will be welcome
Look for getitem() -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (901) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
Rodrigo Leme de Mello wrote:
Example:
- DTML Document id = debug - Name of the property with the path = path_atr - Value of the path_atr = 'folder1/folder2/folder3'
So, how can i take this value and interate inside the folder correspondent to it.?
<dtml-in "restrictedTraverse(path_atr).ObjectValues()">
Any help will be welcome
Try and make your posts slightly less verbose ;-) Also, don't repyl to a message to start a new thread, some of us do have threadign mail clients and it's a little confusing... cheers, Chris
Tim Moore wrote:
No, I understand the basic query syntax. What I'm trying to do is create query which returns all of the objects of type 'Timeslot' that have some non-null value for their 'archive_url' property. It's the second half of that query that I can't figure out...
Catalog(meta_type='Timeslot', archive_url='???')
I've tried archive_url='*', but that doesn't work. Is this even possible using ZCatalog?
Interestingly enough I had to go test this. Why doesn't '*' work? I have no idea. But this returns all: <dtml-in expr="emrCatalog(meta_type='EMR',last_name='')"> <dtml-var last_name> </dtml-in> and this returns all with a last begining with'f' (as expected): <dtml-in expr="emrCatalog(meta_type='EMR',last_name='f*')"> <dtml-var last_name> </dtml-in> I'm sure SOMEONE can tell us why the '*' doesn't work? -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (901) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
participants (4)
-
Chris Withers -
rleme@idg.com.br -
Tim Cook -
Tim Moore