Skip to main content
All CollectionsGetting StartedUser Interface
Variable and Startup Parameter
Variable and Startup Parameter

variable, custom variable, startup parameter

Sophie avatar
Written by Sophie
Updated over 6 months ago

Variable

Variables, as the name suggests, are in contrast to constants (values that remain unchanged). The purpose of using variables is to employ a value that can change based on different scenarios during a process.

Particularly for values that need to be reused, using variables not only enhances the flexibility of the workflow but also reduces the maintenance costs in the long run.

For example, data used multiple times in a process would require multiple times of modifications if not using variables. However, by using variables, we only need to modify the variable value. Then all the commands where the variable is used will update their parameters accordingly.

There are 2 different types of variables in Octoparse RPA: custom variables and flow variables.

Custom variables

Custom variables refer to variables added manually by users themselves.

Currently, Octoparse RPA supports the following 6 types of custom variables:

  • text

  • number

  • boolean

  • data table

  • list

  • dictionary

There are 2 ways to add a custom variable:

  1. Use the Set variable command directly

  2. Click the Variables and the Plus sign in the Asset area

Please note that we can only choose from 3 types of variables: string, number, and boolean when using the Set Variable command. Whereas, we can choose from 6 types of variables mentioned earlier when customizing variables in the asset area. Besides, we can also set default values for variables and add variable descriptions.


Startup parameter

You might also notice that there is a switch button on top to Set as startup parameter for the app you build. By enabling it, a window will pop up for you to fill out the parameter if you run it from the Console page - My Apps as shown in the screenshot below.

However, it will not pop up if you run it from the Editor page.

Startup parameters can be used in scenarios where users need to fill in specific parameters. For example, if you need to input a username and password, you can set it as an app startup parameter in the custom variables. This way, a pop-up window will appear for the user to fill in the login credentials after running the app, hence eliminating the need to fill in the username and password in the Editor page and allowing multiple username and password combinations.

Supported variable types for startup parameter

  • Text

  • Number

  • Boolean

Supported control component type

  • Text box

  • Multi-line text box

  • File selection

  • Folder selection

  • Drop-down menu - Single selection

  • Date picker

  • Time picker

  • Password

Textbox

Used for single-line message input into a text box.

Multi-line text box

Used for multi-line message input into a text box.

File selection

Used to select a specific local file.

Folder selection

Used to select a specific local folder.

Drop-down menu - single selection

Used for setting up a dropdown box for selection.

Date picker

Used for selecting a date to avoid improper date formatting.

Time picker

Used for selecting a time to avoid improper time formatting.

Password

Used for entering a password where input is hidden by black dots to prevent the display of the actual password contents.


Startup parameter settings

For tasks that have checked the option Set as startup parameter for the app you build, the "Run parameter settings" pop-up will appear each time you run the task. Fill in the parameters as required in the pop-up window and then click "Run app."

Note: If "Remember content" is checked, the task will remember the parameter you input and you don't need to fill in the blank next time you run it.

Did this answer your question?