Variables
Variables allow you to dynamically insert values, compute math expressions, generate random data, inspect page URLs, and reference Excel rows or loop counters across form fields and scripts.
Variable Syntax Styles
Excellent Data Filler supports two distinct variable syntax styles depending on the source of the data:
| Syntax | Usage | Examples |
|---|---|---|
{$name$} | References Field Names and Environment Variables (Global & Site-specific). | {$full_name$} {$BASE_URL$} |
{{variable}} | Evaluates Dynamic Built-In Variables (Location, Random, Math, Excel, Loop). | {{location.href}} {{date.today[DD-MM-YYYY]}} |
Combining Variables
You can nest and combine variables inside other functions, URLs, or expressions:
{{math.increase[{$total_items$}]}}{{math.sum[{{loop.index[Loop]}}][1]}}https://example.com/items?page={{loop.index[Loop]}}&user={$username$}
Page Location Variables
Extract URL and origin details of the current web page where automation is executing.
Syntax format: {{variable_name}}
| Variable Name | Description | Example Output |
|---|---|---|
| location.href | Complete active page URL. | https://example.com:8080/portal/form?id=12 |
| location.host | Host domain name including port number. | example.com:8080 |
| location.hostname | Host domain name without port. | example.com |
| location.origin | Protocol and domain origin. | https://example.com:8080 |
| location.pathname | URL path component after the domain. | /portal/form |
Random Generator Variables
Generate realistic dummy data, random numbers, dates, emails, and phone numbers for testing and bulk form submissions.
Syntax format: {{variable_name}}
| Variable Name | Description | Example Output |
|---|---|---|
| random.integer[min][max] | Generates a random integer between min and max. | 7, 11, 24 |
| random.float[min][max][precision] | Generates a random float with specified decimal precision. | 7.45, 11.90 |
| random.string[charset][length] | Generates a random string using character sets (a, A, 0). | A0bAur8K, ud7dhe6 |
| random.email[domain] | Generates a random email address with a custom domain. | [email protected] |
| date.today[format] | Outputs today's date formatted according to Day.js formats. | 07-10-2026 |
| date.today[x] | Outputs the current Unix timestamp in milliseconds. | 1725471600000 |
| random.date[format][start_year][end_year] | Generates a random date within the specified year range. | 2004-06-18 |
| random.mobile[length][prefixes] | Generates a random mobile number of length N starting with given digits. | 9845123456 |
| random.year[start][end] | Generates a random 4-digit year within the specified range. | 2008 |
| random.choose[items][divider] | Randomly picks one item from a delimited string list. | green |
Dynamic Element Selection with Random Integer
Use random integers in CSS selectors to select a random item from a group:
input:nth-child({{random.integer[1][3]}})Month Format: random.month[format][lang]
Generates random month names or numbers in various languages.
| Format Code | Description | Example (en) |
|---|---|---|
n | Numeric month without leading zero (1–12). | 5 |
nn | Numeric month with zero-padding (01–12). | 05 |
s | Capitalized abbreviated month name. | May |
ss | Lowercase abbreviated month name. | may |
su | Uppercase abbreviated month name. | MAY |
f | Capitalized full month name. | January |
fs | Lowercase full month name. | january |
fu | Uppercase full month name. | JANUARY |
Day Format: random.day[format][lang]
Generates random day of week names or indices.
| Format Code | Description | Example (en) |
|---|---|---|
n | Numeric day of week (1–7). | 1 |
nn | Numeric day with zero-padding (01–07). | 01 |
s | Capitalized short day name. | Mon |
ss | Lowercase short day name. | mon |
su | Uppercase short day name. | MON |
f | Capitalized full day name. | Monday |
fs | Lowercase full day name. | monday |
fu | Uppercase full day name. | MONDAY |
Supported Language Codes
| Code | Language | Code | Language |
|---|---|---|---|
en | English | it | Italian |
es | Spanish | pt | Portuguese |
fr | French | ru | Russian |
de | German |
Mathematical Variables
Perform arithmetic operations, counters, string length calculations, and expression evaluations dynamically.
Syntax format: {{variable_name}}
| Variable Name | Description | Example |
|---|---|---|
| math.sum[val1][val2] | Adds val2 to val1. | math.sum[2000][5] |
| math.subtract[val1][val2] | Subtracts val2 from val1. | math.subtract[100][15] |
| math.multiply[val1][val2] | Multiplies val1 by val2. | math.multiply[5][4] |
| math.divide[val1][val2] | Divides val1 by val2. | math.divide[100][4] |
| math.increase[val] | Increments val by 1. | math.increase[2] |
| math.decrease[val] | Decrements val by 1. | math.decrease[3] |
| math.length[string][divider] | Counts items split by divider, or character length if divider is empty. | math.length[a,b,c][,] |
| math.query[expression] | Evaluates arithmetic expressions directly. | math.query[1+2+3+4] |
| math.unique.number | Generates a unique, non-repeating timestamp number. | math.unique.number |
Math Evaluation Examples
{{math.sum[2000][5]}} // Output: 2005
{{math.subtract[100][15]}} // Output: 85
{{math.multiply[5][4]}} // Output: 20
{{math.divide[100][4]}} // Output: 25
{{math.increase[2]}} // Output: 3
{{math.decrease[3]}} // Output: 2
{{math.length[a,b,c][,]}} // Output: 3
{{math.length[hello][]}} // Output: 5
{{math.query[1+2+3+4]}} // Output: 10
{{math.query[5*2]}} // Output: 10
Excel Data Variables
Retrieve active entry counters and access cell values from your uploaded .xlsx spreadsheet.
Syntax format: {{variable_name}}
| Variable Name | Description | Output Format |
|---|---|---|
| excel.row.index | Returns the zero-based index of current active Excel row. | 0, 1, 2, ... |
| excel.row.number | Returns the 1-based row number of current active Excel row. | 1, 2, 3, ... |
| excel.rows.length | Returns the total count of data rows in the active spreadsheet. | Number (e.g., 150) |
| excel.row[row_number][column_name] | Accesses data from a specific row and column header. | Cell string value |
Spreadsheet Format Support
Only .xlsx files are supported for uploaded spreadsheet operations in Excellent Data Filler.
Loop Variables
When using the Loop Field Type, access iteration counts and loop indices to dynamically target elements or execute indexed segments.
Syntax format: {{variable_name}}
| Variable Name | Description | Output |
|---|---|---|
| loop.index[FieldName] | Returns the current loop iteration index for the named Loop field. | Number (0, 1, 2, ...) |
| loop.length[FieldName] | Returns the total configured loop iterations or matched element count. | Total count |
Dynamic Element Targeting with Loop Index
Use loop index variables directly in selectors to automate tables row by row:
table tbody tr:nth-child({{loop.index[FieldName]}}) td.action-btn1-Based Row Targeting
CSS :nth-child() starts at index 1. When using loop indices in table selectors, configure the loop start index to 1 or use 1-based variables. See Using Loop Index in Query Selectors for complete examples.
Store Loop Index Behavior
When Store Loop Index is enabled on the loop field, loop.index returns the saved persistent index across page reloads. When disabled, it returns the active session iteration counter.