ZeroWork
  • 👋Home and Welcome
  • 🚀Getting Started
  • ⬇️Install the Agent
  • 🧑‍💻Crash Course
  • Using ZeroWork
    • 🖥️General: Run, Schedule, Share, Webhooks
      • Run
      • Stop
      • Log in to the Agent
      • Run Modes
        • Run Incognito
        • Run Non-Incognito
        • Run in My Regular Browser
      • Run Settings
        • Run in Background
        • Stay on Page after Run
        • Bring Pages to Front
      • TaskBot Sharing Options
      • Cookies
      • Scheduler
      • Trigger Run via Webhook
      • Proxies
      • Remote (Cloud) Execution
      • How to Check and Update Your Agent
      • Install ZeroWork Agent on VPS
    • 📔Using Selectors
      • What Are Selectors
      • Use Element's Text
      • Copy Selectors
      • How to Build Custom Selectors
        • Basic Concepts of Selectors
        • One Element Can Have Many Selector Expressions
        • Check if Selector Is Correct and Unique
        • Exact or Loose Match
        • Hierarchy
        • Combine Filters with Standard CSS Logic
        • Lists: Incremental CSS Selectors
        • Addressing Siblings
      • How to Use XPath in ZeroWork (advanced)
    • 🏗️Using Building Blocks
      • Open Link
      • Save Page Url
      • Switch or Close Tab
      • Go Back or Forward
      • Switch Frame
      • Browser Alert
      • Click Web Element
      • Check Web Element
      • Save Web Element
        • Save Lists
        • Enrich Existing Data
        • Stop Run If Selector Is Not Found Option
      • Insert Text or Data
      • Hover Web Element
      • Select Web Dropdown
      • Keyboard Action
      • Start Condition and Set Condition
        • Actions = & ≠
        • Actions <, ≤, >, ≥
        • Data Found & Data not Found
        • Contains & Does Not Contain
        • Before (Date) & After (Date)
      • Start Repeat
        • Standard Loop
        • Dynamic Loop
        • Continue until No Element Is Found
        • Auto-Scroll
        • Auto-Continue from Last Row or Element
        • Nested Loops - Handle Pagination
      • After Repeat
      • Break Repeat
      • Try-Catch
      • Raise Error
      • Abort Run
      • Update Data
      • Number Operations
        • Example: Standardize different formats
      • Format Data
        • Remove Words
        • Shorten Content Length
      • Split Data
      • Apply Regex
      • Remove Duplicates
      • Delete Data
      • Ask ChatGPT
      • Send Notification
      • APIs: Send HTTP Request
      • Write JavaScript
      • Save File
      • Upload File
      • Delay
      • Record Date
      • Take Screenshot
      • Save from Clipboard
      • Log
      • Building Block Options
        • Delay Times between the Building Blocks
        • Randomize Delay Time
        • Deactivate Building Blocks
        • Shortcuts
        • Spintax
        • Auto-Align
        • Sticky Notes
    • 🔀Using Variables
    • 💿Using Tables
      • How to Add Tables
      • Native Tables
      • Google Sheets
      • Import Data from CSV
      • Using Google Sheet vs. Native Tables
      • Create Columns
      • Export Data as CSV
      • Convert Native Table to a Google Sheet
    • 📄Using Run Reports
    • 😑Common Problems
      • My TaskBot Does Not Start Run
      • When I Use Data from Table, No Data is Being Pulled
      • Website is Glitching and Flashing
      • No Selector is Found
      • My TaskBot Saves Some Data but Not All
      • Data Is Saved in Wrong Format
      • Website Requires SMS or Email Verification
      • Keyboard Action Is Not Working As Expected
      • Check Web Element Identifies Selector as Found but Next Action Does Not
      • When Using Insert Data Block, First Letters Are Cut Off
      • Workflow Has More than One Starting Building Block
      • TaskBot Does Not Automatically Scroll
  • Support
    • 🆘Getting Support
  • 🆕Release Notes
    • Version 1.1.61
    • Version 1.1.62
    • Version 1.1.63
    • Version 1.1.64
    • Version 1.1.65
    • Version 1.1.66
    • Version 1.1.67
    • Version 1.1.68
Powered by GitBook
On this page
  • Add
  • Subtract
  • Multiply
  • Divide
  • Remainder %
  • Round
  • Round up
  • Round down
  • Get random number
  • Set decimals
  • Remove formatting

Was this helpful?

  1. Using ZeroWork
  2. Using Building Blocks

Number Operations

PreviousUpdate DataNextExample: Standardize different formats

Last updated 17 days ago

Was this helpful?

The Number Operations building block allows you to perform various mathematical and formatting operations on numbers. If the value to apply the operation on is empty, the TaskBot will take no action and continue its run.


Add

Combine two numbers or concatenate two strings.

  • Examples

    • 1 + 1 ⟶ 2

    • "hello" + " world" ⟶ "hello world"

  • Use Case Example

    • Add a counter to limit number of actions per TaskBot run. See example set-up:

Subtract

Subtract one number from another.

  • Example: 5 - 3 ⟶ 2

Multiply

Multiply two numbers.

  • Example: 4 * 3 ⟶ 12

  • See a use case example here: Example: Standardize different formats

Divide

Divide one number by another.

  • Example: 10 / 2 ⟶ 5

Remainder %

Return the remainder after dividing one number by another.

  • Example: 13 % 5 ⟶ 3

Round

Round a number to the nearest whole number.

  • Example: 2.6 ⟶ 3

Round up

Round a number up to the nearest whole number.

  • Example: 2.2 ⟶ 3

Round down

Round a number down to the nearest whole number.

  • Example: 2.7 ⟶ 2

Get random number

Generate a random number within a specified range.

If no minimum or maximum values are provided, the TaskBot will use the default values: 0 for the minimum and 1,000,000,000 for the maximum.

  • Example: Minimum 1, maximum 5 ⟶ 3.45

Set decimals

Set the number of decimal places for a number.

  • Example: 2 decimals: 5 ⟶ 5.00, 5.5333 ⟶ 5.53

Remove formatting

Remove formatting such as commas or dots in a number.

If a number is used for arithmetic calculations (+, -, /, *) or numeric comparisons (> or <), it is recommended to first convert it to a clean number for higher reliability. This is when this operation comes in handy.

  • Examples

    • 1.000.000,23 is dot-grouped and will be converted to 1000000.23

    • 1,000,000.23 is comma-grouped and will be converted to 1000000.23

    • 1,000.000.23 has wrong format and an error report will be generated


Additional Notes

  • If the value to perform the operation on (e.g., value to add to, number to round up) is not provided, the operation is skipped, and the TaskBot will continue without making changes.

  • For operations requiring two values (e.g., add, subtract), if the value to use is not provided, the operation is skipped, and the TaskBot will continue without making changes.

  • If the operation requires a valid number (any operation except Add) and the input is not a number, the TaskBot will generate an error report and stop the run.

🏗️
Example: Use variable to limit number of DMs sent per run