Skip to content

Variables and Data

This reference extends Core Concepts and Variable Types with complete rules and advanced usage.

Common System Variables

RPA Plus provides system variables automatically at runtime; do not create them manually.

VariableValueExample
task_idActive Task IDtask_10001
task_nameActive task nameDaily Product Check
serial_numberActive browser profile row number1001
browser_nameActive browser profile nameStore A
env_idActive Profile IDenv_abc123
env_remarkActive profile notesEast Region Test Account
account_nameUsername for the primary account in the profiledemo@example.com
account_passwordPassword for the primary account in the profile******
cookiesCookie content for the active profileA long cookie string

Passwords and cookies may contain login credentials. Never write them to debug logs, screenshots, public files, or messages to unrelated people.

Data Types in Detail

String

Use a string for a URL, keyword, username, file name, or other short single-line content. A value containing only digits can still be a string when it is not used in calculations.

For example, profile number 0012 should be a string. A numeric value can discard the two leading zeros.

Number

Use a number for loop counts, quantities, page numbers, prices, durations, or other values used in arithmetic and comparisons. Do not include quotation marks or units.

text
Correct: 3
Incorrect: "3"
Incorrect: 3 times

Boolean

A Boolean has two values:

  • true: Yes, enabled, or condition satisfied.
  • false: No, disabled, or condition not satisfied.

The interface displays a switch for a Boolean variable, so you do not enter these words manually.

Array

An array stores an ordered collection such as several URLs, accounts, or keywords. Process each item with For Each Data Item.

Example URL array:

json
["https://example.com/a", "https://example.com/b"]

Rules:

  • Enclose the complete value in ASCII brackets [].
  • Enclose strings in ASCII double quotation marks "".
  • Separate items with ASCII commas ,.
  • Do not add a comma after the last item.

Numbers in a numeric array do not require quotation marks:

json
[1, 2, 3]

Object

An object groups several fields belonging to one record, like a one-row table with a name and value for each field.

Example account object:

json
{"username":"demo@example.com","retry_count":3,"enabled":true}

Rules:

  • Enclose the complete value in ASCII braces {}.
  • Enclose field names and string values in ASCII double quotation marks "".
  • Separate a field name and value with an ASCII colon :.
  • Separate fields with ASCII commas ,.
  • Do not use locale-specific quotation marks, commas, or colons.

This notation for arrays and objects is JSON. Invalid JSON produces a configuration error and cannot be read as intended.

Text, File, and Folder

  • Text: Long or multiline content such as message templates, article bodies, or cookies.
  • File: Complete path to one local file, selected with the file button.
  • Folder: Complete path to one local directory, selected with the folder button.

File and Folder variables store paths, not file contents. When running on another computer, confirm that the path exists and is accessible.

Element Object and Unknown

  • Element object: Produced by Get Focused Element, Get Element Data, and similar nodes; represents one webpage element rather than plain text.
  • Unknown: The result type cannot be determined until the node runs.

For either type, identify its source node and use it in downstream nodes. Do not change the type manually.

Variable Naming Rules

A variable name:

  • Cannot be empty.
  • Uses only ASCII letters, numbers, and underscores _.
  • Cannot begin with a number.
  • Cannot duplicate another name in the same variable list.
  • Is case-sensitive; lowercase letters and underscores are recommended.
RecommendedNot recommendedReason
target_urltarget URLContains a space
account_11_accountBegins with a number
product_titleproduct-titleContains a hyphen
retry_countretry countContains a space

Use a descriptive name such as product_title instead of data1.

Variable Scope

  • System and Start node variables are available throughout the workflow.
  • A variable produced by an intermediate node is available only to connected downstream nodes after it.
  • Across branches, only variables from execution paths that can reach the active node appear in the picker.

Creating the same name later overwrites the earlier value. Use different names for different purposes to avoid reading the wrong data.

Combine Variables

Combine a variable with fixed text. If keyword is wireless headphones, this produces a complete search URL:

text
https://example.com/search?keyword=${keyword}

One field can contain several variables:

text
${serial_number}_${task_id}

At runtime, this may produce 1001_task_10001, helping distinguish files created by different profiles and tasks.

Complete Examples

Visit Several URLs

  1. Create an array variable named product_urls in Start.
  2. Enter this default:
json
["https://example.com/product/1", "https://example.com/product/2"]
  1. Add For Each Data Item and select product_urls as its data.
  2. Save the loop item as current_url.
  3. Enter ${current_url} in the Access Website node inside the loop.

Extract an Object Field

  1. Create an object variable named account_info with:
json
{"username":"demo@example.com","retry_count":3}
  1. Add Extract Field and select account_info as the data.
  2. Enter username as the key and save the result as current_username.
  3. Reference ${current_username} in a downstream account input node.

To read the retry count, extract retry_count instead.

Troubleshooting

A Listed Variable Cannot Be Selected in the Current Node

Confirm that the source node is upstream and connected on the same executable path. A variable produced downstream cannot be used earlier.

Array or Object Has a Format Error

Check that brackets, quotation marks, commas, and colons are ASCII and that no trailing comma follows the final item. Copy an example from this page and replace its content.

${variable_name} Remains Visible After Inserting a Variable

This is expected in the editor. It is a placeholder replaced by the actual value only when execution reaches the node.

Should a Numeric-looking Value Be a String or Number?

Use Number for arithmetic, loops, or numeric comparisons. Use String for an identifier, phone number, or displayed text. For example, loop count 3 is a Number, while profile number 0012 is a String.