• OK, I just added another

    OK, I just added another foreach loop to iterate through the list and retreive the values. Seems like way too much work to get this data though. Next I'll work on storing key, value pairs in a dictionary.

     

     public static void getKeywords(DocumentsQueryResult DocResults)
            {
                foreach (Document doc in DocResults.Items)
                {
                    Document document = doc.GetDocumentFromSelfRelation();
                    foreach (DocumentIndexField field in document.Fields)
                    {
                        if(field.ItemElementName.ToString() == "Keywords" )
                        {
                            DocumentIndexFieldKeywords keywords = (DocumentIndexFieldKeywords)field.Item;
                            foreach (var str in keywords.Keyword)
                            {
                                Console.WriteLine(str);
                            }

                        }
                    }
                }

            }

     

    Thanks for the help, I was spinning my wheels over this one. 

  • link to documentation

    Also, here's a link to more info from the documentation about the Keywords class: http://help.docuware.com/sdk/platform/html/P_DocuWare_Platform_ServerCli...

     

  • Additional info

    So I've made some progress with this, though i don't know for sure if I'm on the right track. I figured out that after I use a DocumentQueryResult to get the results of a dialog expression, You can iterate through the documents in the results and call the .GetDocumentFromSelfRelation() method on each. This returns the keyword fields as well as the others, however the DocumentIndexFieldKeywords class does not have a GetEnumerator() method, so I haven't been able to actually retrieve the values stored inside the keyword fields, thogh I can get the fieldLabel and fieldName properties. 

     

    Here's what I've been working on, you just need to pass a DocumentQueryResult to the method and you should be able to see the actual keyword fieldNames listed. Any ideas how to get the values after this? I don't have a return type on the method yet because I'm still trying to figure out how to store and access the data, so I'm just printing out the info to the Console (.NET)

     

            public static void getKeywords(DocumentsQueryResult DocResults)
            {
                foreach (Document doc in DocResults.Items)
                {
                    Document document = doc.GetDocumentFromSelfRelation();
                    foreach (DocumentIndexField field in document.Fields)
                    {
                        if(field.ItemElementName.ToString() == "Keywords" )
                        {
                            Console.WriteLine(field.FieldName);
                        }
                    }
                }

            }

  • DocuWare API - retrieve keyword fields

    Using the DocuWare Platform Service APIs, I've been able to retrieve documents' field values, however I am not able to retreive keyword field/values using this method. The documentation doesn't show a good example of what needs to be done in order to achieve this. 

     

    I'm using the DocumentQueryResult method to return results.

     

    Are there additional steps that need to be done in order to retreive keyword fields?