Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In a custom list definition bound to a custom content type, I attached the out of the box AssignedTo field.

In the schema, I defined a view with this query :

    <Query>
      <OrderBy>
        <FieldRef Name="Modified"
                  Ascending="FALSE"></FieldRef>
      </OrderBy>
      <Where>
        <Or>
          <Membership Type="CurrentUserGroups">
            <FieldRef Name="AssignedTo"/>
          </Membership>
          <Eq>
            <FieldRef Name="AssignedTo" />
            <Value Type="Integer">
              <UserID />
            </Value>
          </Eq>
        </Or>
      </Where>
    </Query>

The idea of this view is to display items either if the current user is specified in the AssignedTo field, or if the user is member of the group specified in the field.

This is working as expected. However, as soon as I change something in the view settings with the browser, the query is broken. It seems that the web UI does not know how to interpret my custom query, and override it when I save.

How can I avoid this settings page to break my query? is there a better way to display direct assignation or indirect assignation in the same view ?

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.