<?xml version="1.0"?>
<filterdescription>
    <partset>
        <part name="summary">
            <title>Summary</title>
            <input type="optionlist" name="summary-type">
                <option value="contains">
                    <title>contains</title>
                    <code>(contains? "summary" ${summary})</code>
                </option>
                <option value="not contains">
                    <title>does not contain</title>
                    <code>(not (contains? "summary" ${summary}))</code>
                </option>
            </input>
            <input type="string" name="summary"/>
        </part>

        <part name="description">
            <title>Description</title>
            <input type="optionlist" name="description-type">
                <option value="contains">
                    <title>contains</title>
                    <code>(contains? "description" ${description})</code>
                </option>
                <option value="not contains">
                    <title>does not contain</title>
                    <code>(not (contains? "description" ${description}))</code>
                </option>
            </input>
            <input type="string" name="description"/>
        </part>

	<part name="name2">
	     <title>Organizer</title>
	      <input type="optionlist" name="name-type">
		       <option value="contains">
		           <title>contains</title>
		           <code>(contains? "organizer" ${name})</code>
		       </option>
		      <option value="not contains">
		           <title>does not contain</title>
		          <code>(not (contains? "organizer" ${name}))</code>
		      </option>	
	     </input>
	     <input type="string" name="name"/>
	</part>

	<part name="name3">
	     <title>Attendee</title>
	     <input type="optionlist" name="name-type">
		       <option value="contains">
			   <title>contains</title>
		           <code>(contains? "attendee" ${name})</code>
		      </option>
		      <option value="not contains">
			   <title>does not contain</title>
		           <code>(not (contains? "attendee" ${name}))</code>
		      </option>
     	     </input>
	     <input type="string" name="name"/>
	</part>

        <part name="anyfield">
            <title>Any Field</title>
            <input type="optionlist" name="anyfield-type">
                <option value="contains">
                    <title>contains</title>
                    <code>(contains? "any" ${anyfield})</code>
                </option>
                <option value="not contains">
                    <title>does not contain</title>
                    <code>(not (contains? "any" ${anyfield}))</code>
                </option>
            </input>
            <input type="string" name="anyfield"/>
        </part>

        <part name="status">
            <title>Status</title>
            <input type="optionlist" name="status-type">
                <option value="is">
                    <title>is</title>
                    <code>(contains? "status" ${status})</code>
                </option>
                <option value="is not">
                    <title>is not</title>
                    <code>(not(contains? "status" ${status}))</code>
                </option>
            </input>
            <input type="optionlist" name="status">
                <option value="NOT STARTED">
                    <title>Not Started</title>
                </option>
                <option value="IN PROGRESS">
                    <title>In progress</title>
                </option>
                <option value="COMPLETED">
                    <title>Completed</title>
                </option>
                <option value="CANCELLED">
                    <title>Cancelled</title>
                </option>

            </input>
        </part>

        <part name="attachments">
            <title>Attachments</title>
            <input type="optionlist" name="match-type">
                <option value="exist">
                    <title>Exist</title>
                    <code>
                        (has-attachments?)
                    </code>
                </option>
                <option value="not exist">
                    <title>Do Not Exist</title>
                    <code>
                        (not(has-attachments?))
                    </code>
                </option>
            </input>
        </part>

        <part name="priority">
            <title>Priority</title>
            <input type="optionlist" name="priority-type">
                <option value="is">
                    <title>is</title>
                    <code>(contains? "priority" ${priority})</code>
                </option>
                <option value="is not">
                    <title>is not</title>
                    <code>(not(contains? "priority" ${priority}))</code>
                </option>
            </input>
            <input type="optionlist" name="priority">
                <option value="HIGH">
                    <title>High</title>
                </option>
                <option value="NORMAL">
                    <title>Normal</title>
                </option>
                <option value="LOW">
                    <title>Low</title>
                </option>
                <option value="UNDEFINED">
                    <title>Undefined</title>
                </option>

            </input>
        </part>

        <part name="category">
            <title>Category</title>
            <input type="optionlist" name="category-type">
                <option value="is">
                    <title>is</title>
                    <code>(has-categories? ${category})</code>
                </option>
		<option value="is not">
                    <title>is not</title>
                    <code>(not(has-categories? ${category}))</code>
                </option>
            </input>
            <input type="optionlist" name="category">
                <option value="Anniversary">
                    <title>Anniversary</title>
                </option>
                <option value="Holiday">
                    <title>Holiday</title>
                </option>
                <option value="Ideas">
                    <title>Ideas</title>ke
                </option>
                <option value="Status">
                    <title>Status</title>
                </option>
                <option value="Holiday Cards">
                    <title>Holiday Cards</title>
                </option>
                <option value="Hot Contacts">
                    <title>Hot Contacts</title>
                </option>
                <option value="International">
                    <title>International</title>
                </option>
                <option value="Next 7 days">
                    <title>Next 7 days</title>
                </option>
                <option value="Birthday">
                    <title>Birthday</title>
                </option>
                <option value="VIP">
                    <title>VIP</title>
                </option>
                <option value="Gifts">
                    <title>Gifts</title>
                </option>
                <option value="Waiting">
                    <title>Waiting</title>
                </option>
                <option value="Key Customer">
                    <title>Key Customer</title>
                </option>
                <option value="Time &amp; Expenses">
                    <title>Time &amp; Expenses </title>
                </option>
                <option value="Miscellaneous">
                    <title>Miscellaneous</title>
                </option>
                <option value="Business">
                    <title>Business</title>
                </option>
                <option value="Personal">
                    ke
                    <title>Personal</title>
                </option>
                <option value="Suppliers">
                    <title>Suppliers</title>
                </option>
                <option value="Goals/Objectives">
                    <title>Goals/Objectives</title>
                </option>
                <option value="Strategies">
                    <title>Strategies</title>
                </option>
                <option value="Competition">
                    <title>Competition</title>
                </option>
                <option value="Favourites">
                    <title>Favourites</title>
                </option>
                <option value="Phone Calls">
                    <title>Phone Calls</title>
                </option>
            </input>
        </part>

        <part name="completed">
            <title>% Completed</title>
            <input type="optionlist" name="completed-type">
                <option value="is">
                    <title>is</title>
                    <code>
                        (= (percent-complete?) ${versus} )
                    </code>
                </option>
                <option value="is-not">
                    <title>is not</title>
                    <code>
                        (not(= (percent-complete?) ${versus} ))
                    </code>
                </option>
                <option value="greater-than">
                    <title>is greater than</title>
                    <code>
                        (&gt; (percent-complete?) ${versus} )
                    </code>
                </option>
                <option value="less-than">
                    <title>is less than</title>
                    <code>
                        (&lt; (percent-complete?) ${versus} )
                    </code>
                </option>
            </input>
            <input type="completedpercent" name="versus"/>
        </part>

    </partset>
    <ruleset>
        <rule grouping="any" source="demand">
            <_title>Summary Contains</_title>
	 <partset>
        	<part name="summary">
	          <value name="summary-type" type="option" value="contains"/>
        	  <value name="summary" type="string"/>
        	</part>        
         </partset>

            <sources/>
        </rule>

        <rule grouping="any" source="demand">
            <_title>Description Contains</_title>
	<partset>
	        <part name="description">
        	  <value name="description-type" type="option" value="contains"/>
	          <value name="description" type="string"/>
        	</part>        
       </partset>

            <sources/>
        </rule>

        <rule grouping="any" source="demand">
            <_title>Any field contains</_title>
	<partset>
 	       <part name="anyfield">
        	  <value name="anyfield-type" type="option" value="contains"/>
	          <value name="anyfield" type="string"/>
        	</part>
        </partset>

            <sources/>
        </rule>
    </ruleset>

</filterdescription>
