We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You must opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>QuerySearchHelp (22 Jun 2008, SeanCMorgan)
Tags:
create new tag
, view all tags

Question

I am on the QuerySearch page looking at the Search examples and I have a few questions.

I am trying to copy the code but inserting my own values and my search does not seem to work. For instance the following example:

Find all topics that have form ColourForm? where the form field 'Shades' is 'green' or 'yellow' but not 'brown'

Searched: (lc(Shades)='green' OR lc(Shades)='yellow') AND NOT(lc(Shades) ~ 'brown')

Number of topics: 0

How does this search know to look at only topics with the form ColourForm? ? How does this search even know to look only at topics with forms period?

I am trying to do the same search but with a form called TestForm? . How should my code look?

Also, I am trying to create a search that finds all topics that were created by a certain time.

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- MichaelParker - 19 Jun 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

You might find an answer in TWiki.QuerySearchPatternCookbook.

-- ArthurClemens - 20 Jun 2008

> How does this search know to look at only topics with the form ColourForm?

By using the field name in your query, you used ...

a shortcut for accessing form fields. If you use the name of a field (for example, LastName) in the query without a . before it, that is taken to mean "the value of the field named this".
The name of the form it belongs to is optional, but recommended, according to TWiki:TWiki04x02/QuerySearch.

-- SeanCMorgan - 22 Jun 2008

 
Change status to:
Topic revision: r5 - 22 Jun 2008 - 18:11:11 - SeanCMorgan
Support.QuerySearchHelp moved from Support.QuerySeachHelp on 20 Jun 2008 - 14:22 by DavidWolfe - put it back
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback