nsForum logo

Welcome Guest ( Log In )

 
Reply to this topicStart new topic
> Filtering, How to do multiples?
Eddie
post Oct 15 2009, 05:57 PM
Post #1





Group: Verified NS Member
Posts: 104
Joined: 5-March 09
From: Sunnyvale, CA
Member No.: 3,922



CODE
<soapenv:Body>
<urn:ReadOrderRequest>
<urn:DetailSize>Large</urn:DetailSize>
<urn:FilterList>
<urn:Field>Status OrderStatusID</urn:Field>
<urn:Operator>Equal</urn:Operator>
<urn:ValueList>6</urn:ValueList>
</urn:FilterList>
</urn:ReadOrderRequest>
</soapenv:Body>


can't seem to get the above code to return only the orders with StatusIDs of 6 for example. Also, if I wanted to filter out orders that are past a certain date AND had SatusIDs of 6, how would this be written out?
Go to the top of the page
 
+Quote Post
ddavisNS
post Oct 15 2009, 10:02 PM
Post #2


QA


Group: Administrators
Posts: 1,864
Joined: 10-August 07
Member No.: 6



QUOTE (Eddie @ Oct 15 2009, 06:05 PM) *
can't seem to get the above code to return only the orders with StatusIDs of 6 for example. Also, if I wanted to filter out orders that are past a certain date AND had SatusIDs of 6, how would this be written out?


CODE
<soapenv:Body>
  <urn:ReadOrderRequest>
    <urn:DetailSize>Large</urn:DetailSize>
    <urn:FilterList>
      <urn:Field>Status.OrderStatusID</urn:Field>
      <urn:Operator>Equal</urn:Operator>
      <urn:ValueList>6</urn:ValueList>
      <urn:SubFilterList>
        <urn:Field>CreateDate</urn:Field>
        <urn:Operator>GreaterEqual</urn:Operator>
        <urn:ValueList>2009-10-01T00:00:00.000Z</urn:ValueList>
      </urn:SubFilterList>
    </urn:FilterList>
  </urn:ReadOrderRequest>
</soapenv:Body>


This does orders with ID equal to 6 that were created after Oct 1.

If it wasn't working for you with just the one filter it was likely because you needed a "." between the parts of the filter field.
Go to the top of the page
 
+Quote Post
Eddie
post Oct 16 2009, 12:47 PM
Post #3





Group: Verified NS Member
Posts: 104
Joined: 5-March 09
From: Sunnyvale, CA
Member No.: 3,922



QUOTE (ddavisNS @ Oct 15 2009, 10:10 PM) *
CODE
<soapenv:Body>
  <urn:ReadOrderRequest>
    <urn:DetailSize>Large</urn:DetailSize>
    <urn:FilterList>
      <urn:Field>Status.OrderStatusID</urn:Field>
      <urn:Operator>Equal</urn:Operator>
      <urn:ValueList>6</urn:ValueList>
      <urn:SubFilterList>
        <urn:Field>CreateDate</urn:Field>
        <urn:Operator>GreaterEqual</urn:Operator>
        <urn:ValueList>2009-10-01T00:00:00.000Z</urn:ValueList>
      </urn:SubFilterList>
    </urn:FilterList>
  </urn:ReadOrderRequest>
</soapenv:Body>


This does orders with ID equal to 6 that were created after Oct 1.

If it wasn't working for you with just the one filter it was likely because you needed a "." between the parts of the filter field.



Yup, it was the "." that i was missing. The API document shows a space. Something to add to correct on the next revision. thanks again Dave.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version    Network Solutions © 2010 Time is now: 21st March 2010 - 08:10 AM
Domain Names | Web Hosting | Web Design | Shopping Cart Software | Online Marketing | SSL Certificates