Math Functions

Overview:

The 'Math Function' data action block allows you to perform basic mathematical operations on flat field values from extracted data. You can apply Addition, Subtraction, or Multiplication to selected fields to calculate new values.

Steps to Set Up the 'Math Function' Block:

  1. Access Your Workflow:

    • Navigate to the 'Workflow' section from the left panel on your Nanonets Extract Data page.
  2. Add a New Data Action Block:

    • Click on “Add a new step” to view the list of available data action blocks.
    • From the options, choose "Math Function".
    Math Function

    Math Function

  3. Select Operation:

    • Select the mathematical operation you want to apply to two fields. The three supported operations are:
      • Addition
      • Subtraction
      • Multiplication
    • For example, to calculate the difference between subtotal_amount and total_amount, choose Subtraction.
    Select Operation

    Select Operation

  4. Select Fields:

    • Choose the two fields (field_1 and field_2) on which you want to perform the operation.
    • Optionally, you can enter a constant value for either or both fields if you want to include a fixed integer/float value in the calculation.
    Select Fields

    Select Fields

  5. Enter New Field Name:

    • Give a name to the new field where the result of the calculation will be stored.
    New Field Name

    New Field Name

  6. Test the Action:

    • Select an uploaded file and click "Run Test" to verify that the block is working as expected with your selected fields and operation.
    Test the Action

    Test the Action

  7. Complete Setup:

    • Once you’re satisfied with the configuration and the test results, click "Done" to save the action.
    Complete Setup

    Complete Setup

You can apply this data action conditionally, using the Conditional Block.