Crafting Clouds
Workflows
April 7, 20266 min read

How to Automate Calculations in Method CRM Using the Action Editor

Yousif Hakim
Yousif Hakim

Method CRM Expert · 480+ Custom Builds · Former Lead Solutions Consultant at Method

After more than 480 Method CRM builds, if I had to pick one feature that separates a basic setup from a truly powerful one, it would be the Action Editor. This is where Method goes from a fancy contact database to a fully automated business system — and in this post I'm going to show you exactly how to use it to auto-calculate totals from your line items.

This is Part 4 in my series on Method CRM customization. If you haven't watched the earlier episodes, I'd recommend starting there to get the foundation, but this post stands on its own.

What Is the Method CRM Action Editor?

The Action Editor is Method's built-in automation engine. I call it "the Mecca of Method" because it's where all the real magic happens. You can find it by clicking the dropdown arrow on any screen, choosing Customize Screen, and then clicking into any button on that screen.

Inside the Action Editor you'll find a catalog of actions you can chain together:

  • Navigate to a screen or web page
  • Loop through a grid or table
  • Run math functions (add, subtract, multiply, divide)
  • Assign values to variables (called Action Results in Method)
  • Update controls on screen
  • Call another routine (essentially calling a function from a different button)
  • Save all records

No coding required. You build your logic visually by stringing these actions together in sequence.

Why Use a Hidden Button for Your Logic?

Before I walk through the calculation example, I want to share a pattern I use on almost every build: storing reusable logic inside a hidden button.

Here's the idea. Instead of duplicating your automation inside every button that needs it (Save, Save & Back, a custom action button, etc.), you put the logic once inside a hidden button, then call that hidden button from everywhere else using the Call Routine action.

This is the DRY principle applied to Method CRM. If you ever need to update your logic, you update it in one place and every button that calls it automatically inherits the change. I named mine fnc_CalculateAmount — the fnc_ prefix is a convention I use to make function buttons easy to identify.

To create it: go to the screen you want to automate, enter Customize Screen, drag a Button element into your hidden section, name it fnc_CalculateAmount, then click into it to open the Action Editor.

Setting Up the Loop Through Grid

The goal here is to sum all the amounts from a grid of line items (Potential Services in this example) and push the total into a header field on the screen. The amount field in the header was showing zero — this automation fixes that automatically whenever the record is saved.

Step 1 — Initialize your variable

Before entering the loop, use Assign Value to Action Result to create a variable. I named mine result_amount and set its initial value to 0. This gives us a clean starting point so we're not adding onto stale data from a previous calculation.

Step 2 — Add the Loop Through Grid action

In the catalog, choose Loop Through Grid and point it at your services grid. You'll notice there's also a "Loop Through Table" option — the difference matters. Loop Through Grid reads the line items currently on screen (including unsaved rows), while Loop Through Table reads from the database (saved records only). Since we want to capture amounts even before the user saves, Loop Through Grid is the right choice.

There's also a "Only select rows that are checked" option. Leave that unchecked if you want to sum all rows.

Step 3 — Add the Math action inside the loop

While inside the loop, click Add Action Below and choose Math from the catalog. Set the function to Add. You'll see loop values appear in the field picker — these represent the current row's fields as the loop iterates. Select the Amount loop value as one operand, and your result_amount variable as the other. Store the result back into result_amount.

What this does on each iteration: it takes whatever is currently in result_amount, adds the current row's amount, and stores the sum back into the variable. After the loop finishes, result_amount holds the grand total.

Step 4 — Update the amount field on screen

After the loop (back at the top level of your function), add an Update Controls on Screen action. Point it at the Amount field in your header and set the value to result_amount. This pushes the calculated total into the visible field so the user sees it immediately.

Calling Your Function from the Save Button

Now that the logic lives in fnc_CalculateAmount, you need to call it from your Save button. Open the Save button in the Action Editor, remove any duplicate save logic, and add a Call Routine action pointing to fnc_CalculateAmount. Then add your Save All action below it.

Order matters here. The calculation must run before the save so the correct total gets written to the database. If you put Save All first, the old amount gets saved before the new total is calculated.

For any other buttons that also save (like Save & Back), repeat the same pattern: Call Routine → fnc_CalculateAmount, then Save All.

Why This Approach Scales

I've built this pattern on everything from simple service quote screens to complex multi-table field service workflows. The advantages compound as your system grows:

  • Maintainability — one change to fnc_CalculateAmount propagates everywhere
  • Consistency — every save path runs the exact same calculation
  • Readability — your save buttons stay clean and delegate to named functions

For more on how I approach Method CRM customization, including screen design and field setup, check out that overview page.

If you want to see how this connects to your QuickBooks data, my post on syncing QuickBooks Online with Method CRM covers the integration side.

The Action Editor is deep — loops, conditionals, email triggers, record creation — but mastering this loop-and-accumulate pattern unlocks a huge chunk of what people need in practice. Start here and build from it.

Book a free strategy call and let's get your Method CRM working for you.

action editor
automation
method crm
workflows
customization

Need Help with Method CRM?

I've customized Method CRM for over 480 businesses. Book a free strategy call and let's solve your challenge.