Difference: QuerySearch (7 vs. 8)

Revision 825 Sep 2013 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

Query Search

Line: 20 to 20
 All meta-data in a topic is referenced according to a simple plan.

  • name - name of the topic
Added:
>
>
  • topictitle - title of the topic
 
  • web - name of the web the topic is within
  • text - the body text of the topic
  • META:FILEATTACHMENT
Line: 134 to 135
 
  • (Firstname='Emma' OR Firstname='John') AND Lastname='Peel' - shortcut form of the previous query
  • HistoryForm[name='Age'].value>2 - true if the topic has a HistoryForm, and the form has a field called Age with a value > 2
  • HistoryForm.Age > 2 - shortcut for the previous query
Changed:
<
<
  • preferences[name='FaveColour' AND value='Tangerine'] - true if the topic has the given preference setting and value
>
>
  • preferences[name='FaveColor' AND value='Tangerine'] - true if the topic has the given preference setting and value
 
  • Person/(ClothesForm[name='Headgear'].value ~ '*Bowler*' AND attachments[name~'*hat.gif' AND date < d2n('2007-01-01')]) - true if the form attached to the topic has a field called Person that has a value that is the name of a topic, and that topic contains the form ClothesForm, with a field called Headgear, and the value of that field contains the string 'Bowler', and the topic also has at least one attachment that has a name matching *hat.gif and a date before 1st Jan 2007. (Phew!)

Search examples

Line: 147 to 148
 
%SEARCH{"attachments[name='grunge.gif']" type="query"}%
Changed:
<
<
Find all topics that have form ColourForm where the form field 'Shades' is 'green' or 'yellow' but not 'brown'
>
>
Find all topics that have form ColorForm where the form field 'Shades' is 'green' or 'yellow' but not 'brown'
 
%SEARCH{"(lc(Shades)='green' OR lc(Shades)='yellow') AND NOT(lc(Shades) ~ 'brown')" type="query"}%
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.QuerySearch.