ECGrid Forums  

Go Back   ECGrid Forums > Electronic Commerce > ECGridOS > ECGridOS Developer

ECGridOS Developer Development related posts.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2011, 08:19 PM
Todd Gould's Avatar
Todd Gould Todd Gould is offline
Loren Data Corp.
 
Join Date: May 2005
Location: Loren Data Corp.
Posts: 303
Send a message via Skype™ to Todd Gould
Question Limiting Returned Records by Pages

I have the underlying code in place to be able to return data by pages such as Page=x RecordsPerPage=y. This will work for future version of ParcelInBoxArchive(), ParcelOutBoxArchive() and InterchangeInBox(), InterchangeOutBox() and the Ex versions.

The question I propose is do you want me to add two parameters to each function:

Page As Short
RecordsPerPage As Short

I would use -1 for each value to indicate return all records.

Or would you prefer a separate function calls that would be set for each Session such as:

SetReturnSetSize(RecordsPerPage)
SetReturnSetPage(Page)

That would be global for all calls. You would then need to call SetReturnSetPage() before each page you want from each call.

As I see it, the benefit of using the separate global session functions is that it does not change the current API calls at all. The default for each session start would be Page=-1 and RecordsPerPage=-1. By making these extra calls, you can adjust the behavior of the session. I'm leaning towards this.

The other simplifies the process by simply specifying the Page/RecordsPerPage on each call.

I would like to hear your thoughts on this.

-=tg=-
Reply With Quote
  #2  
Old 01-28-2011, 02:27 PM
elDub elDub is offline
New Member
 
Join Date: Mar 2010
Posts: 16
Question

While this isn't a suggestion for one syntax over another, I do have a question as to the proper syntax of the request assuming it is as you have described it. When I pass the following XML I am getting nothing returned even though I have uploaded, downloaded and confirmed a parcel within the date range referenced. (I am using the endpoint of https://ecgridos.net/v2.3/prod/ECGridOS.asmx)

Code:
<ParcelInBoxArchive xmlns="http://ecgridos.net/">
  <SessionID>01971496-d8f1-4113-890a-639acd7ed383</SessionID>
  <BeginDate>2011-01-27T14:23:02-05:00</BeginDate>
  <EndDate>2011-01-28T14:23:02-05:00</EndDate>
  <ECGridIDFrom>-1</ECGridIDFrom>
  <ECGridIDTo>-1</ECGridIDTo>
  <MailbagControlID>-1</MailbagControlID>
  <PageNo>-1</PageNo>
  <RecordsPerPage>-1</RecordsPerPage>
</ParcelInBoxArchive>
The response I am getting back is:

Code:
<ParcelInBoxArchiveResponse xmlns="http://ecgridos.net/">
  <ParcelInBoxArchiveResult />
</ParcelInBoxArchiveResponse>
Which of my parameters are incorrect for the API? Are my date parameters invalid? The service isn't throwing back a fault with these values.

-Lonnie
Reply With Quote
  #3  
Old 02-01-2011, 01:38 PM
Todd Gould's Avatar
Todd Gould Todd Gould is offline
Loren Data Corp.
 
Join Date: May 2005
Location: Loren Data Corp.
Posts: 303
Send a message via Skype™ to Todd Gould
Default

As Lonnie pointed out to me in a follow-up e-mail outside the forum, the issue is the <MailbagControlID> tag.

This is a string field used for exact matches with an X12.56 Mailbag Control ID. While the values are typically numeric, they can also be blank (not zero).

Unless you are looking for a specific X12.56 Mailbag, then leave this value blank.

-=tg=-
Reply With Quote
  #4  
Old 02-01-2011, 01:40 PM
elDub elDub is offline
New Member
 
Join Date: Mar 2010
Posts: 16
Default

Quote:
Originally Posted by Todd Gould View Post
As Lonnie pointed out to me in a follow-up e-mail outside the forum, the issue is the <MailbagControlID> tag.
... and meant to post a followup correction to his post but got sidetracked. Thanks Todd.
Reply With Quote
  #5  
Old 09-12-2012, 08:05 AM
Alex Obraztsov Alex Obraztsov is offline
New Member
 
Join Date: Aug 2012
Location: Techdinamics Inc.
Posts: 6
Default

Hi Todd,

What about getting counts for paged view, such as full count of parcels in archive (without loading them all)? How can I do that? For instance if I know that there are 26 records, I will expect 3 pages by 10 records maximum. Also, I might need this number for mailbox short usage statistics - large ones and small ones. I think I could do this through ReportTrafficStatsEx() for years, but is it Ok? I need only four numbers - inbox/archive and outbox/archive counts.
Reply With Quote
  #6  
Old 09-12-2012, 10:11 AM
Todd Gould's Avatar
Todd Gould Todd Gould is offline
Loren Data Corp.
 
Join Date: May 2005
Location: Loren Data Corp.
Posts: 303
Send a message via Skype™ to Todd Gould
Lightbulb New paged functions to be available in v3.0

Alex,

I was just working on that problem yesterday. The solution is a new function (instead of the several above). It will be something like:

ParcelMailboxPaged(SessionID, NetworkID, MailboxID, MailboxType, BeginDate, EndDate, ECGridIDFrom, ECGridIDTo, MailbagControlID, PageNumber, RecordsPerPage, Descending)

MailboxType will be an ENUM as follows:
InBoxActive
InBoxArchive
OutBoxArchive
Descending will be a Boolean for sort order. Sort will be by date.

If InBoxActive is selected, the BeginDate and EndDate will be ignored.

If ECGridIDFrom and ECGridIDTo are set to -1, then they will match all.

PageNumber and RecordsPerPage will both be Short

It will return a ParcelIDInfoCollection with the following properties:
RecordsPerPage Short (Same as provided parameter)
PageNumber Short (Same as provided parameter)
Count Short (number of actual records in the ParcelIDInfoList below, could be less than RecordsPerPage if on last page)
TotalRecords Integer (total meeting selection criteria)
TotalPages Integer (total number of pages with this page size)
ParcelIDInfoList as ParcelIDInfo()
A paged function will be available for InterconnectIDs.

This will be available in v3.0. I expect the Beta release the end of October.

-=tg=-
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:49 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
ECGrid® is a registered service mark of Loren Data Corp.