Wheregroup

A wheregroup groups together where conditions in the search file.

 

What does this section cover?

Attributes

NameDescriptionValue
groupandorDefines how the conditional statements (wheregroups) of the where clause are connected to each other.AND (default), OR
wherefieldsA tag which contains <wherefield> tags, which define the fields that are used in the where clause.

Wherefields

wheremembersA tag which contains <wherefield> tags, which define the conditions of the where clause.Wheremembers

Example

The following will be translated to: WHERE (ACTIVITIES.ACTIVITYDELETED = 0 AND ACTIVITIES.LIFECYCLESTATE = 'COMPLETED') OR (ACTIVITIES.ACTIVITYDELETED=1 AND ACTIVITIES.LIFECYCLESTATE = 'CANCELLED')

Note that only ACTIVITIES.ACTIVITYDELETED field is defined in wherefield list because ACTIVITIES.LIFECYCLESTATE has already been defined in field list as one of the visible fields.

 Wheregroup
Wheregroup
<wheregroups>
	<wheregroup>
			<groupandor>AND</groupandor>
            <wherefields>
                <wherefield>
                    <field>ACTIVITIES.ACTIVITYDELETED</field>
                    <alias>Expr001</alias>
                    <expression>VALUE</expression>
                </wherefield>
            </wherefields>
            <wheremembers>
                <wheremember>
					<lparenth>0</lparenth>
					<lfield>ACTIVITIES.ACTIVITYDELETED</lfield>
					<expression>=</expression>
					<rfield>0</rfield>
					<rparenth>0</rparenth>
					<andor>AND</andor>
				</wheremember>
				<wheremember>
					<lparenth>0</lparenth>
					<lfield>ACTIVITIES.LIFECYCLESTATE</lfield>
					<expression>=</expression>
					<rfield>COMPLETED</rfield>
					<rparenth>0</rparenth>
					<andor>AND</andor>
				</wheremember>
            </wheremembers>
    </wheregroup>
	<wheregroup>
			<groupandor>OR</groupandor>
            <wheremembers>
                <wheremember>
					<lparenth>0</lparenth>
					<lfield>ACTIVITIES.ACTIVITYDELETED</lfield>
					<expression>=</expression>
					<rfield>1</rfield>
					<rparenth>0</rparenth>
					<andor>AND</andor>
				</wheremember>
				<wheremember>
					<lparenth>0</lparenth>
					<lfield>ACTIVITIES.LIFECYCLESTATE</lfield>
					<expression>=</expression>
					<rfield>CANCELLED</rfield>
					<rparenth>0</rparenth>
					<andor>AND</andor>
				</wheremember>
            </wheremembers>
    </wheregroup>
</wheregroups>