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
--
MichaelParker - 19 Jun 2008
Answer
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