Unanswered Pagefieldvalue in queryoverride CAML for Sharepoint Publishing page

  • 22 ноября 2011 г. 21:56
     
     

    I am having issues setting more than three filters using the queryoverride property. It works just fine if i pass fixed values to the fields like instead of [PageFieldValue:Primary Office], if i feed in 'XYZ Office' then it is able to read that value and pull content based on it...but not with the PageFieldValue...I am trying to pull content from other pages in the page libray that match the primary office value of the current page...so If I am in Doctor X's page and his primary office is XYZ then it should pull all other doctors from XYZ Office, where XYZ office could be the other doctor's primary office or other extra practice location?? Please any sharepoint GURU??

    <Query>
       <Where>
          <And>
             <Neq>
                <FieldRef Name='Title' />
                <Value Type='Text'>[PageFieldValue:Title]</Value>
             </Neq>
             <Or>
                <Eq>
                   <FieldRef Name='Office' />
                   <Value Type='Text'>[PageFieldValue:Primary Office]</Value>
                </Eq>
                <Or>
                   <Eq>
                      <FieldRef Name='Office1Name2' />
                      <Value Type='Text'>[PageFieldValue:Primary Office]</Value>
                   </Eq>
                   <Or>
                      <Eq>
                         <FieldRef Name='OtherOffice2Name' />
                         <Value Type='Text'>[PageFieldValue:Primary Office]</Value>
                      </Eq>
                      <Eq>
                         <FieldRef Name='OtherOffice3Name' />
                         <Value Type='Text'>[PageFieldValue:Primary Office]</Value>
                      </Eq>
                   </Or>
                </Or>
             </Or>
          </And>
       </Where>
    </Query>

Все ответы