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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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:
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2008-06-22 - SeanCMorgan
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.