cancel
Showing results for 
Search instead for 
Did you mean: 

DocPop does not respect order in which requested document handles are listed

Joseph_Malecki
Confirmed Champ
Confirmed Champ

I am using the Unity API Document Query to create a DocPop URL comprised of multiple document IDs separated by comma.  More precisely, the DocPop URL reflects a subset of items returned by the document query. After executing the Document Query, each document in the resulting Document List goes through a vetting process to determine whether or not it should be included in the DocPop URL. We have no problem determining which documents to include in the DocPopURL.

However, we have a requirement to display the documents in a particular order: They must be sorted by DocumentType.Name(ASC) then by DocumentDate(DESC) then by ID(DESC). Therein lies the rub. We have no problem with the sort using a List object and an IComparable interface. The problem we experience is that after creating the URL with document IDs in the desired order (as shown below), DocPop presents the list of documents in a different order - DocumentDate(ASC). I was unable to find any information in the SDK or MRG or Community to force DocPop to display documents in the order specified.

DocPopURL: http://obwebp-prod4/AppNet/Docpop/docpop.aspx?clienttype=html&docid=29840457,29806889,27643735,27676...    

We could display a separate interface that mimics a DocPop retrieval window, but would only consider that as a last resort. Any help from the Community will be greatly appreciated.

Thank you!

1 ACCEPTED ANSWER

Scott_McLean
Elite Collaborator
Elite Collaborator

Hi Joseph,

Unfortunately, you're right. There is no functionality in a DocPop link to pass sort columns. So in order to display a default sort through DocPop, you would be limited to a link that executes a custom query. Within a custom query, you can define both the display and sort columns including sort order.

If you populated the document handle into a keyword on each document, then you could construct a custom query based on that keyword and pass the document ids in a link like this one (In this example, I'm imagining that the custom query ID is 101 and the keyword type is 102):

http://your_server/appnet/docpop/docpop.aspx?clienttype=html&cqid=101&KT102_0_0_1=docId1&KT102_1_0_1...

Then, you can configure the sort columns for your custom query to sort in the manner you have indicated, and the sorted results should be displayed properly.

Kind regards,

-Scott

View answer in original post

2 REPLIES 2

Scott_McLean
Elite Collaborator
Elite Collaborator

Hi Joseph,

Unfortunately, you're right. There is no functionality in a DocPop link to pass sort columns. So in order to display a default sort through DocPop, you would be limited to a link that executes a custom query. Within a custom query, you can define both the display and sort columns including sort order.

If you populated the document handle into a keyword on each document, then you could construct a custom query based on that keyword and pass the document ids in a link like this one (In this example, I'm imagining that the custom query ID is 101 and the keyword type is 102):

http://your_server/appnet/docpop/docpop.aspx?clienttype=html&cqid=101&KT102_0_0_1=docId1&KT102_1_0_1...

Then, you can configure the sort columns for your custom query to sort in the manner you have indicated, and the sorted results should be displayed properly.

Kind regards,

-Scott

Hi Joseph

I think Scott have a very good suggestion here. I would definitely recommend testing this scenario.

As far as order, I am not surprised that DocPop is displaying the Documents in a Different Order than specified initially. In almost all cases, this happens (i.e.: DocumentQueries). Unfortunately, the return order of object cannot be guaranteed.

Please let us know, as well as the rest of community if the above suggestion works as expected.