Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Alternate criteria for DumpOrder request?

  1. #1
    swheeler is offline Junior Member
    Join Date
    Oct 2008
    Posts
    17

    Default Alternate criteria for DumpOrder request?

    Hi,

    I've got the following DumpOrder request that works as it's supposed to:

    <AspDotNetStorefrontImport Verbose="false">
    <Get Table="Orders" Name="NewOrders">
    <XmlPackage>DumpOrder.xml.config</XmlPackage>
    <OrderBy>OrderDate asc</OrderBy>
    <Criteria IsNew="1"/>
    </Get>
    </AspDotNetStorefrontImport>


    Is there any way to specify an alternate/additonal criteria for retrieving order numbers greater than 'xxxxxxx' or orders entered after 'mm/dd/yyyy hh:mm:ss''?

    Thanks,
    Scott

  2. #2
    Vortx is offline Junior Member
    Join Date
    Feb 2010
    Posts
    22

    Default

    Hi Scott,

    To accomplish this via the WSI you can use the DefaultWhereClause that can be used as a Node in the XML. For example, try something like the following:

    <AspDotNetStorefrontImport Verbose="false">
    <Get Table="Orders" Name="NewOrders">
    <XmlPackage>DumpOrder.xml.config</XmlPackage>
    <OrderBy>OrderDate asc</OrderBy>
    <DefaultWhereClause>OrderNumber>=123456 AND IsNew=1</DefaultWhereClause>
    </Get>
    </AspDotNetStorefrontImport>

    Also, I've found that you need to remove the Criteria element if you use a DefaultWhereClause to get the results that you want.

    Jim Layton
    Vortx, Inc.
    PO Box 899
    Ashland, OR 97520 USA
    541.201.9965
    www.vortx.com
    Vortx... very tech

  3. #3
    swheeler is offline Junior Member
    Join Date
    Oct 2008
    Posts
    17

    Default

    Got it.

    For anyone thats interersted, the following request uses XML escape sequences to expand the conditional filtering:

    <AspDotNetStorefrontImport Verbose="false">
    <Get Table="Orders" Name="NewOrders">
    <XmlPackage>DumpOrder.xml.config</XmlPackage>
    <DefaultWhereClause> OrderNumber&gt;100004</DefaultWhereClause>
    <OrderBy>OrderDate asc</OrderBy>
    </Get>
    </AspDotNetStorefrontImport>

    Typically, the only four characters that need to be escaped are:
    " &quot;
    < &lt;
    > &gt;
    & &amp;

    Be sure to exclude <Criteria IsNew="1"/>, otherwise you will get more data back than you expect.

    Scott