Veröffentlicht Wed, 04 Jul 2018 10:50:56 GMT von Martin Kreft

Hello.

I have to generate a huge amount of data records.

With the "Crate data record" button in my inbox this will take to much time.

I tried to program a small application (C#) for automated creation, but i have problems finding the correct methods for accessing the data record dialog in the API.

Can someone help me with a code snippet or somethig else?

Veröffentlicht Thu, 05 Jul 2018 11:42:16 GMT von Joe Kaufman Bell Laboratories Inc No longer there

Martin,

To create a data-only document, I have not used C#/.NET, but have it working from Visual Foxpro (or any language that can manipulate an HTTP request object).

The resource in play is this one:

/DocuWare/Platform/FileCabinets/{cabinbet guid}/Documents/

and then once I have an HTTP request object instance established (in this case, "_DWPlatformService"), the code to POST the request looks like this:

_DWPlatformService.Open("POST", "<URL involving the resource listed above>")
* Need to use a Content-Type of "application/xml" otherwise the POST will simply create a document with the index data XML inside it.
_DWPlatformService.SetRequestHeader("Content-Type", "application/xml")
_DWPlatformService.Send(<POST data>)

The POST data looks something like this, for a cabinet including indexes COMPANY and SENDER as an example:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/DocuWare/Platform/Content/standard.xslt"?>
<Document xmlns:s="http://dev.docuware.com/schema/public/services" xmlns="http://dev.docuware.com/schema/public/services/platform">
    <Fields>
        <Field FieldName="COMPANY"><String>Data Only Company</String></Field>
        <Field FieldName="SENDER"><String>Data Only Sender</String></Field>
    </Fields>
</Document>

This will create a data-only document in the desired file cabinet.

Thanks,
Joe Kaufman

Veröffentlicht Thu, 05 Jul 2018 11:55:15 GMT von Martin Kreft

Thank you.

I developed a solution with a empty PDF but this should do better.

Veröffentlicht Thu, 05 Jul 2018 12:16:57 GMT von Joe Kaufman Bell Laboratories Inc No longer there

Martin,

We were doing that as well before we figured this out -- happy to help!

 

Thanks,

Joe Kaufman

Veröffentlicht Fri, 06 Jul 2018 04:46:00 GMT von

Answert on an other way

Veröffentlicht Fri, 06 Jul 2018 06:56:32 GMT von Martin Kreft

Hello.

A colleague was able to help me today.
He knew this function from GAPI and could show me the API variant.

It works in C# quite simply via ShemaExtentions:

SchemaExtensions.PostToUploadDocumentForDocumentAsync(<DwConnection>, <ArchiveGuid>,<Document() with the IndexData>);

Veröffentlicht Fri, 06 Jul 2018 10:50:39 GMT von Joe Kaufman Bell Laboratories Inc No longer there

Martin,

Glad you figured it out in the .NET environment, and thanks for posting (will be good for future reference when searching for soulutions!).

 

Thanks,

Joe Kaufman

Sie müssen angemeldet sein um Beiträge in den Foren zu erstellen.