cancel
Showing results for 
Search instead for 
Did you mean: 

complex conditions in virtual folder

fararjeh
Champ in-the-making
Champ in-the-making
Hi,


How I can build structure query in virtual folder xml file for this query :
cmis:folder.cmis:createdBy = 'fararjeh' and ( F:re:requestForm.reSmiley TongueurchasingManagerStatus ='approve' or F:re:requestForm.re:employeeStatus = 'done')

This is virtual folder xml file:


<node name="طلبات قيد التحضير" containsdocs="true">
   <search versionselection="currentversion">
      <from>
         <class symname="folder" />
      </from>
      <select>
         <selectprops>
            <selectprop symname="F:re:requestForm.re:employeeStatus" />
            <selectprop symname="F:re:requestForm.re:mangerStatus" />
            <selectprop symname="F:re:requestForm.re:purchasingManagerStatus" />                  
            <selectprop symname="F:re:requestForm.re:employeeName" />
            <selectprop symname="F:re:requestForm.re:employeeId" />
            <selectprop symname="F:re:requestForm.re:titleJop" />
            <selectprop symname="F:re:requestForm.re:mobileNumber" />
            <selectprop symname="F:re:requestForm.re:branchName" />
            <selectprop symname="F:re:requestForm.re:management" />
            <selectprop symname="F:re:requestForm.re:notes" />                  
         </selectprops>
      </select>
      <where>
         <and>
            <eq>
               <whereprop editproperty="hidden" symname="cmis:folder.cmis:createdBy"/>
               <literal>{username}</literal>
            </eq>         
            <eq>
            <whereprop editproperty="hidden" symname="F:re:requestForm.re:purchasingManagerStatus" />
               <literal>approve</literal>
            </eq>
            <eq>
               <whereprop editproperty="hidden" symname="F:re:requestForm.re:employeeStatus"/>
               <literal>done</literal>
            </eq>   
         </and>               
      </where>               
      <subclasses>
         <subclass objecttype="folder" symname="F:re:requestForm" />
      </subclasses>
   </search>
</node>
1 REPLY 1

fararjeh
Champ in-the-making
Champ in-the-making
I solved it Smiley Happy


<where>      
   <and>
      <eq>
         <whereprop editproperty="hidden" symname="cmis:folder.cmis:createdBy"/>
         <literal>{username}</literal>
      </eq>
   </and>   
   <and>
      <or>
         <eq>
            <whereprop editproperty="hidden" symname="F:re:requestForm.re:purchasingManagerStatus"/>
            <literal>approve</literal>
         </eq>   
         <eq>
            <whereprop editproperty="hidden" symname="F:re:requestForm.re:employeeStatus"/>
            <literal>done</literal>
         </eq>                        
      </or>                  
   </and>               
</where>