<eConnectOut>

Additional information

The <eConnectOut> XML node is an important part of the XML document you use to complete a Transaction Requester query. You use the elements of the <eConnectOut> XML node to specify the type of document, the records to select, and how to return the query result.

Element name

Data type

Length

Required

Default

Description

DOCTYPE

string

50

Y

Not applicable

Type of document.

OUTPUTTYPE

i4

4

N

0

Specifies the format of the information

0=List

1=Master document

2=Complete document

3=Remove. Use when REMOVE is set to 1.

INDEX1TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX1.

INDEX2TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX2.

INDEX3TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX3.

INDEX4TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX4.

INDEX5TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX5.

INDEX6TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX6.

INDEX7TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX7.

INDEX8TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX8.

INDEX9TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX9.

INDEX10TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX10.

INDEX11TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX11.

INDEX12TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX12.

INDEX13TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX13.

INDEX14TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX14.

INDEX15TO

string

75

N

<blank>

Specifies the last select criteria value for INDEX15.

INDEX1FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX1.

INDEX2FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX2.

INDEX3FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX3.

INDEX4FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX4.

INDEX5FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX5.

INDEX6FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX6.

INDEX7FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX7.

INDEX8FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX8.

INDEX9FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX9.

INDEX10FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX10.

INDEX11FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX11.

INDEX12FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX12.

INDEX13FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX13.

INDEX14FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX14.

INDEX15FROM

string

75

N

<blank>

Specifies the first select criteria value for INDEX15.

FORLOAD

i4

4

N

0

Specifies whether to save the query information in the eConnect_Out table.

0=Do not load query information in the eConnect_Out table.

1=Load query information in the eConnect_Out table

FORLIST

i4

4

N

0

Specifies whether to return the query result to the caller. No query information is added to the eConnect_Out table.

0=Do not return the XML from the query result to the caller.

1=Return the XML from the query result to the caller.

When FORLIST is set to 1, the values of FORLOAD, REMOVE, and ACTION are automatically reset to 0.

ACTION

i4

4

N

0

Use ACTION to specify the type of data to return. You set this element when you request data using the eConnect_Out table.

0=All documents

1=Inserts

2=Updates

3=Deletes

4=Returns inserts and updates as separate documents.

5=Combines all inserts and updates into a single document.

ROWCOUNT

i4

4

N

0

Specifies the number of rows to return.

0=All rows

Any other number specifies the maximum number of documents to get.

REMOVE

i4

4

N

0

Specifies whether to remove the query document from the eConnect_Out table.

0=Do not remove the query from the eConnect_Out table

1=Remove the query from the eConnect_out table.

DATE1

datetime

8 bytes

(19 to 23 chars)

N

<blank>

Specifies the date to use to remove documents from the eConnect_Out table. OUTPUTTYPE must be 3 and REMOVE must be 1. Records in the eConnect_Out table with date values prior to this date are deleted.

WhereClause

string

1000

N

<blank>

Specifies a custom "where clause" using the columns from the parent table of the requested document type.

To use the <eConnectOut> XML node with the Transaction Requester, you need to use the following elements:

  • You use DOCTYPE to specify the type of Transaction Requester document you are targeting. The DOCTYPE value must match one of the document types in the eConnect_Out_Setup table. Examples include Customer, Employee, and Sales_Transaction.
  • You use FORLOAD when you want your query to produce documents for the Outgoing Service. If you set FORLOAD to one, your query information is placed in the eConnect_Out table. The Outgoing Service uses your query information to create an eConnect XML document and place that document into a queue.
  • You use FORLIST when you want the Transaction Requester to return the query result directly. You typically use this with the GetEntity method of the eConnectMethods class to get an XML string that represents the query result.
  • You use the INDEXFROM and INDEXTO elements to specify the select criteria for your query. The number for each INDEXFROM and INDEXTO correpond to the INDEX columns for the specified document type in the eConnect_Out_Setup table. For example, INDEX1 for the Customer document type in the eConnect_Out_Setup table is CUSTNMBR. To use <eConnectOut> to retrieve cusomer information, you must use customer number values in INDEX1FROM and INDEX1TO.
  • To request a single record, place the same value in the INDEX1FROM and INDEX1TO field. To get several records, place the first value in the INDEXFROM element and the last element in the INDEXTO element. The Transaction Requester retrieves your first and last values and any records with an index value between them.

The following example shows how to use <eConnectOut> to retrieve a list of customers from the TWO database. Notice how INDEX1FROM specifies a customer number and INDEX1TO specifies a second customer number. The Transaction Requester returns XML that includes the two specified customers and any customers with a customer number between the two specified values.

<eConnectOut>
    <DOCTYPE>Customer</DOCTYPE>
    <OUTPUTTYPE>2</OUTPUTTYPE>
    <INDEX1TO>ALTONMAN0001</INDEX1TO>
    <INDEX1FROM>AARONFIT0001</INDEX1FROM>
    <FORLOAD>0</FORLOAD>
    <FORLIST>1</FORLIST>
    <ACTION>0</ACTION>
    <ROWCOUNT>0</ROWCOUNT>
    <REMOVE>0</REMOVE>
</eConnectOut>