cancel
Showing results for 
Search instead for 
Did you mean: 

Sort a documentList by a specified keyword

Not applicable

Hello

I am trying to do a sort for a DocumentList by a keyword, I have a folder type that contains several documents and I am making a folderQuery to get all the documents that contains the folder, then I want to assing all the documents to a doclist to be sort by a keyword that is a sequential integer to assing data base on the doctype and the sequential key. 

foreach(Folder folder in folderList)
{

    DocumentList doclist = folder.GetDocuments();

    foreach
(Document document in doclist)
   
{

          //Sort all the documents and add them in a list or array    
    }
}

 

1 REPLY 1

Seth_Yantiss
Star Collaborator
Star Collaborator

Jayson,

It may help, for clarity's sake, to ask a few questions:

1. Are you trying to sort the documents based upon an existing keyword that is currently assigned to the document?

2. Once you sort the documents by each folder, the ending array would contain documents first by folder then by your document sort order, is this your intent?

3. How are you planning to run this code?  Unity?  External application?

4. Is "Assing" supposed to be "Assigning", or is this perhaps, some new DBA term?  😉    (It was used twice folks, cut me some slack)

Cheers,
Seth