0

I'm trying to reach out to a calendar, look for the item with the number 10 inside of column ABCD, and then tell me the item ID for that item.

I'm using a workflow that calls a web service to reach out to the target list.

I'm obviously doing something wrong but I have no idea what it is. Someone, please help me out here.

<?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>CalendarPublish</listName>
        <viewName></viewName>
        <query>
            <Where>
                  <Eq>
                     <FieldRef Name='ABCD' />
                     <Value Type='Integer'>10</Value>
                  </Eq>
           </Where>
        </query>
        <ViewFields>
            <FieldRef Name='ID' />
        </ViewFields>
        <rowLimit>100</rowLimit>
        <webID></webID>
    </GetListItems>
 </soap:Body>
</soap:Envelope>
0
Could you try this ? 
var soapEnv =
        "<soapenv:Envelope 
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
            <soapenv:Body> \
                 <GetListItems 
xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                    <listName>CalendarPublish</listName> \
                    <viewFields> \
                        <ViewFields> \
                           <FieldRef Name='ABCD' /> \
 <FieldRef Name='ID' /> \
                       </ViewFields> \
  </viewFields> \
  <query> \
   <Query> \
<Where> \
<Contains> \
     <FieldRef Name='ABCD' /> \
     <Value Type='Integer'>"+qry+"</Value> \
  </Contains> \
  </Where> \
</Query> \
  </query> \
   </GetListItems> \
            </soapenv:Body> \
        </soapenv:Envelope>";
  • Perhaps I should specify. I'm using a workflow that calls a web service to reach out to the target list. Maybe I'm wrong but this doesn't look like normal XML? Either way, I tried it. It didn't work. – NMJohns Apr 14 '17 at 12:08
0

I figured it out. The actual working code is below.

    <?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>CalendarPublish</listName>
    <query>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name="ABCD"></FieldRef>
    <Value Type="text">10</Value>
    </Eq>
    </Where>
    </Query>
    </query> 
    <ViewFields>
    <FieldRef Name="ID" >
    </FieldRef> 
    </ViewFields>
    <QueryOptions> 
    </QueryOptions>
    </GetListItems>
    </soap:Body>
    </soap:Envelope>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.