Posted Fri, 08 Jun 2018 20:09:24 GMT by Jon Weston File IT Solutions Sr Application Developer and RIM specialist

How can I remove all entries from a keyword field using either v6.12 Workflow Manager or a web service?  I've tried assigning an empty (freshly initialized) keyword variable to it in workflow manager and I've tried adding a fixed value of "" but neither of those work.

Posted Mon, 11 Jun 2018 14:06:40 GMT by Joe Kaufman Bell Laboratories Inc No longer there

Jon,

I don't know about Workflow Manager, but this can be done via the Platform Service (if that is what you mean by "web service").

POST to the DocuWare resource:

/DocuWare/Platform/FileCabinets/{cabID}/Documents/{docID}/Fields

The post data (XML) looks like this to clear out all keywords for a field:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/DocuWare/Platform/Content/standard.xslt"?>
<DocumentIndexFields xmlns:s="http://dev.docuware.com/schema/public/services" xmlns="http://dev.docuware.com/schema/public/services/platform">
    <Field FieldName="<field_name>">
        <Keywords></Keywords>
    </Field>
</DocumentIndexFields>

I just tested the non-.NET routine I wrote to do this and was able to add, modify, and clear out keywords no problem. I imagine in .NET you simply pass an empty keywords List (or "null"?) to whatever method wraps the SDK resource.

Hope this helps, if using the SDK is an option.

Thanks,
Joe Kaufman

Posted Wed, 04 Sep 2019 21:23:53 GMT by Jon Weston File IT Solutions Sr Application Developer and RIM specialist
you're right, Joe, I'm using C# and just putting Null in there works.  eg: Keyword = new List<string>() { null }

How do I add values to a keyword field without removing what's already in there?  eg. in the sample code:
DocumentIndexField.Create("TAGS", 
                        new DocumentIndexFieldKeywords() {
                            Keyword = new List<string>() { "Café", "Expensive", "Tasty" }
                        }),

If "Cafe" and "Expensive" are already in the field how would I add "Tasty" without deleting the other two because if I just do "Keyword = new List<string>() { "Tasty" }" that's what happens.
 
Posted Fri, 31 Jan 2020 15:40:37 GMT by Tobias Getz DocuWare GmbH Team Leader Product Management
Hi Jon,
I know this post is old.
Actually the command just replaces all existing keywords with the new ones. So you have to read the current content and then write the current content plus the new content. 

You must be signed in to post in this forum.