Publié Fri, 22 Sep 2023 14:00:06 GMT par Jagannathan Jayaraman OA Technocrat
Use Case: We have created a web form Basic where a user will be selecting set of documents that are getting attached to the form using check box . Example 1. Resume. 2 Application Form 3. Proof of Payment 4 Medical Report and so on.  Let us assume that the user selects Resume and Application Form . Using behaviour i have created two attachments dialogs saying attach Resume and attach Application Form. Actual goal is to store each attachment as individual documents like First Document type index will be Resume and the Second Document Type index is Application Form Rest of the index would be common to both the documents.  Since Docuware currently doesn't stores separate attachments in forms. As a work around i had created a merge form (using blank page) such a way each attachment is link with Each Merge Form.  The challenges i am currently facing is that if i have 4 attachments i need to create 4 merge forms so that i can split them as 4 different documents which is still fine. In my use case as explained.  If the user has selected only two options instead of all the four options.  Once the user submits the form. Four Documents are created since i have used four merge forms.  My Question to community . 1. To my best knowledge it is not possible to set in form such a way that submit only merge forms which has attachments., if this is not possible then is it possible to create a work flow to delete the file which does not have attachments without creating API.  Secondly Is it possible to delete the first page of the Document stored which is a blank PDF in my case.

Any Suggestion are really appreciated

Regards

Jagan
Publié Fri, 22 Sep 2023 14:38:07 GMT par Connie McMahan Software & Database Manager
I have a somewhat similar use case.  For your first question, I do this via a Deletion Policy instead of via a workflow or API.  The documents I don't need are indexed in such a way that I can create a deletion policy to delete it when indexed like that.
I'm curious to see any others responses you get.
Publié Fri, 13 Oct 2023 08:46:39 GMT par Tobias Getz DocuWare GmbH Team Leader Product Management
Hi Jagannathan Jayaraman and Connie McMahan,

For the first question I would currently recommend the same procedure as Connie McMahan using a deletion policy.

The second topic can be done with DocuWare Version 7.9 as the Workflow can now access the DocuWare Platform API to perform certain activities. One of the supported activities is deleting files from a document. With this activity you can delete the empty form (the first file of the document).

Regards
Tobias Getz
Team Leader Product Management
DocuWare GmbH
Publié Tue, 19 Mar 2024 08:18:32 GMT par Michal Cepek
Hi Tobias,
can you please specify how can be deleted file (PDF attachment) from document via workflow/Docuware Platform API ?
There are 2 "Delete" operations - documentDelete and sectionDelete.
documentDelete I suppose will delete whole document. So probably sectionDelete can be used for specific (first?) file deleting?
Can you show some examples?

Thank you
Publié Tue, 19 Mar 2024 09:09:54 GMT par Tobias Getz DocuWare GmbH Team Leader Product Management
Hi Michale Cepek,

you are right, documentDelete will delete the whole document and sectionDelete will delete one section of a document.
For additional information you probably need to check the Postman collection and check the API call for "Documents".
First you need to check the sections of the document with
GET {{ServerUrl}}/{{Platform}}/FileCabinets/{{FileCabinetId}}/Sections?DocId={{DocumentId}}
then you can get the first SectionID and use
DELETE {{ServerUrl}}/{{Platform}}/FileCabinets/{{FileCabinetId}}/Sections/{{SectionId}}
to delete the section.

Regards
Tobias Getz
Team Leader Product Management
DocuWare GmbH
Publié Tue, 19 Mar 2024 15:24:04 GMT par Michal Cepek

Hi Tobias,

thank you, it worked. I used workflow web services "Docuware Platform API".

At first I created GV as DocID and then GET operation for DocID information as Response. Via Data Assign I created "$.Sections[0].Id" as another GV.

Then I created DELETE operation based on GV of SectionId which removed attachment from document.

You must be signed in to post in this forum.