How to Remove a Variable?

You are currently viewing How to Remove a Variable?

To remove a variable, you must first create it.

Before you remove any variables from your projects, make sure that you are not using this variable in any activities as this may result in exceptions.

Removing variables can be done in multiple ways:

  • From the Variables Panel
  • Remove Unused Variables Button

From the Variables Panel

Deleting Variables using the Variables Panel allows you to specify which variables to delete one by one.
  • Step 1: Navigate to the Variables panel
  • Step 2: Right Click the Variable Name
  • Step 3: Left Click Delete (or press the Delete Key on the keyboard)

Remove Unused Variables

There is also a function that allows you to remove all variables that have been defined in the Variables panel but are not currently being used in the automation file.

This function can be found in the Design Ribbon at the top called Remove Unused Variables.

When clicked, it will automatically remove any variables that are not used in any activities in the currently opened file. This saves a lot of time, as you now do not need to search for any unused variables throughout the currently opened file.

   Note: This function only removes variables from the currently opened file, not the entire project.