RemoveFormFileAttachments Step

Use this step to remove file attachments from a form instance

Last published at: June 10th, 2024

Description:

This step removes the file attachments from a form instance. 

 

Inputs

  • formInstanceID – a variable that holds the form instance ID
  • filefieldMappings -Variable to hold a mapping of file Control ID
  • formID -Variable to hold form ID 
  • fileAttachmentsPath - Variable to store the file attachments path
  • fileAttachmentsFileName - Variable to store the file names attached
  • fileAttachmentsFormat - File list format (XML / JSON)
 

 

Returns

  • True – True condition
  • False – False condition 
 

 

Usage:

 

 

Example:

Let’s build and execute the removeFormFileAttachmentsDef example.      

  • Create a new definition called “removeFormFileAttachmentsDef
  • Select the definition and click the “design” button
  • Drag a removeFormFileAttachments step from the toolbox
  • Connect the dots between the steps as shown in the below graphic 
  • Click the “getFileAttachments” step to configure its “Settings” properties. Provide a step name. Provide a variable/global reference to store form instance ID. Click on the Save to confirm. 

 

  • Select the form definition from the drop-down list. Click on the button to map the form files to be removed.  

 

  • Configure the mapping of the form file to remove files, as shown in the graphic below. In this example, the ErrorLog.xml file, previously attached through a form instance, is configured for removal. 

 

  • Save the process definition, create a process instance, and execute. Provide the form instance ID (previously created with some file attachments) to the variable as shown here. 
  • Render the process instance to view the step properties. Render the form instance to view the file attachments. The file mentioned has been successfully removed from the form instance.