Skip to main content
Search Again

We think these articles could help you:

    See More
    Nintex Knowledge Base

    Passing a Filter to ”GetlistItems” Web Method

    Summary
    How to pass a filter to ”GetlistItems” web method in Lists.asmx

    Solution
    Use the following template:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > <soap:Body> <GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <listName>string</listName>
    <query>
    <Query>
    </Query>
    </query> 
    <ViewFields>
    </ViewFields>
    <QueryOptions> 
    </QueryOptions>
    </GetListItems>
    </soap:Body>
    </soap:Envelope>
    
    Working sample: 
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > <soap:Body> <GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <listName>MyList</listName>
    <query>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name="ID"></FieldRef>
    <Value Type="Number">2</Value>
    </Eq>
    </Where>
    </Query>
    </query> <ViewFields>
    <FieldRef Name="ID" ></FieldRef> </ViewFields>
    <QueryOptions> 
    </QueryOptions>
    </GetListItems>
    </soap:Body>
    </soap:Envelope>
    • Was this article helpful?