Filtering SharePoint List by SharePoint Group and Status

In order to display only not closed (Abgeschlossen) items assigned to the group that one is a member of, I added the following where clause to the form query, where "Gruppe" is the group that one is a member of and "Status" is the state for all not closed items.

Where><
    And><
        Neq><FieldRef Name="Status"/><Value Type="Text">Abgeschlossen</Value></Neq><
        Or><
            Membership Type="CurrentUserGroups"><FieldRef Name="Gruppe"/></Membership><
            Eq><
                FieldRef Name="Gruppe"/><Value Type="Integer"><UserID Type="Integer"/></Value><
            /Eq><

        /Or><
    /And><
/Where><

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: