RemoveFormFileAttachments Step

Use this step to remove file attachments from a Form Instance

Last published at: August 5th, 2025

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” and open the definition in designer mode. 
  • Drag a “removeFormFileAttachments” step to the canvas. 
  • Connect the dots between the “Start” and “removeFormFileAttachments” steps, as shown above.  
  • Click the “getFileAttachments” step to configure its “Required” properties. Provide a name for the step. Provide a variable or a global reference to store the Form Instance ID. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description. 

 

  • Select the Form Definition from the drop-down list. Click the button to map the Form files to be removed. Click the Save button. 

 

  • A pop-up window is displayed for configuration. Click the Add Row button to insert an empty row. Provide the file ID and the file name to be removed. Select the “RemoveAllFiles” checkbox to remove all attached files. Click the Save button. You may insert multiple mappings by using the Add Row button.  

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Please submit a Form with the file attachments as shown in the example below. Take note of the Form Instance ID in the URL address bar. (e.g, 3d56f7b0-9d7d-4c6f-822e-efec0010a85a)

 

  • Save the process definition, create a new instance, and then execute it. Provide the Form Instance ID (previously created with some file attachments) value to the variable as shown in the image below. Click the Create and Execute button. 

 

  • Render the process instance to verify the completion status. 

 

  •  Render the Form Instance to view the file attachments. The files have been removed from the Form Instance as shown in the example below.  

 

Definition Sample:

You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after import. Then, save the definition to confirm the changes.

Click here to download the sample file.