Publicado Fri, 08 Jun 2018 20:09:24 GMT por Jon Weston

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.

Publicado Mon, 11 Jun 2018 14:06:40 GMT por Joe Kaufman

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

Publicado Wed, 04 Sep 2019 21:23:53 GMT por Jon Weston
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.
 

You must be signed in to post in this forum.