RemoveFormFileAttachments Step

Last published at: May 2nd, 2023

Description:

Gets all the file attachments for a form instance ID

Delete

Inputs

  • formInstanceID – variable that holds the form instance ID
  • filefieldMappings -Variable to hold 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)
Delete

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 on the below graphic 

  • Click on the “getFileAttachments” step to configure its properties
  • Configure the following values for the properties as shown on the below graphic. Select an existing form definition which has File control and the form instance with some files submitted. 
  • Configure the mapping of form file to remove files as shown on the below graphic. In this example, the ErrorLog.xml file, attached through a form instance previoulsy, 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 remove from the form instance successfully.