Posted Thu, 11 Feb 2021 01:55:15 GMT by Alvaro Paniagua Martinez Developer
Hi everyone,

This is more of a question than a problem. I've search everything but I'm not able to find the answer.

We are developing a application that leverage the docuware .net api to auto store documents from a Document Tray to a File Cabinet.

But prior to executing the PostToTransferRelationForDocumentsQueryResult(transferInfo) to store the documents; we would like trim the value of an existing field. For some reason when I query the Document Tray then try to extract the existing fields associated to the documents I can only see the System entries and not the pre-defined index values. I supposed it's due to the fact that the document is not yet "Indexed".

Here is a snippet of my code:

                    FileCabinet selectedDocTray = ((FileCabinet)this.CmbBoxDocTray.SelectedItem).GetFileCabinetFromSelfRelation();
                    FileCabinet selectedFC = ((FileCabinet)this.CmbBoxFileCab.SelectedItem).GetFileCabinetFromSelfRelation();
                    var storedialog = ((DialogInfo)this.CmbStoreDgl.SelectedItem).GetDialogFromSelfRelation();

                    DocumentsQueryResult result = ListAllDocuments(selectedDocTray, int.MaxValue); //Note: the "selectedDocTray" is the source document tray.
                    var existingFields = result.Items[0].Fields; //Note: Based on the SDK, this line of code should retrieve all fields from the document (System Entries and Index Fields)

But it's not, we are only getting back all system entries.

If anybody have any insight and would like to share we would greatly appreciate it. 

Posted Thu, 11 Feb 2021 09:20:03 GMT by Simon H. Hellmann Toshiba TGIS GmbH | IT-Consultant - Document Management Solutions
Hi Alvaro, 

try to call document.GetDocumentFromSelfRelation() before looking up the values of the index fields. 

Greetings from Germany, 
Simon H. Hellmann
DocuWare System Consultant
Posted Thu, 11 Feb 2021 14:17:21 GMT by Alvaro Paniagua Martinez Developer
Hi Simon,

Thank you very much! That worked perfectly. 

Greetings from Mexico,
Alvaro Paniagua Martinez

You must be signed in to post in this forum.