Update Many Records at Once in Zoho Creator with Deluge

Mass Update Records in a Zoho Creator Database

Every price rises, every category gets renamed, every field eventually needs backfilling. The pattern is always the same: select the records you mean with a criteria set, loop them, write the change. The whole technique is two lines — what matters is the care around them.

Written from scratch. The original entry for this topic was a single sentence and an embedded video. The video is on YouTube and is included below, but the written article is new.

The pattern

// ============================================
// MASS UPDATE — run from a scheduled function,
// not from a form workflow.
// ============================================

void Updates.repriceCategory(string categoryName, decimal pctIncrease)
{
factor = 1 + (pctIncrease / 100);
changed = 0;

// Filter in the query. Never fetch everything and test inside the loop.
for each prod in Product[Category == categoryName && Active == true]
{
oldPrice = ifnull(prod.Price,0);
if(oldPrice > 0)
{
prod.Previous_Price = oldPrice; // keep an audit trail
prod.Price = (oldPrice * factor).round(2);
prod.Price_Updated = zoho.currentdate;
changed = changed + 1;
}
}

info "Repriced " + changed + " products in " + categoryName;
}

Video walkthrough

Notes

  • Put the filter in the criteria, not in an if. Product[Category == x && Active == true] asks the database for the right rows. Fetching everything and testing inside the loop pulls the whole table into memory and will hit the iteration cap on any real dataset.
  • Run it once against one record first. Add && ID == 12345 to the criteria, confirm the result, then remove it. There is no undo on a mass update.
  • Keep the previous value. Previous_Price costs one field and turns an irreversible mistake into a recoverable one.
  • Scheduled function, not form workflow. Anything touching more than a few hundred rows will exceed the script timeout if it runs inside a form submission.
  • Count what you changed. The changed counter is how you find out the criteria matched nothing — otherwise a script that quietly did zero work looks identical to one that succeeded.

This script is part of the free Creator Scripts Deluge Library.

All 39 Deluge scripts, the full Zoho Creator course, and every downloadable asset are now free. Get free access →

    • Related Articles

    • Complete Zoho Creator String Functions Guide

      Creator Scripts Zoho Trusted Partner in Digital Transformation Complete Zoho Creator String Functions Guide Essential String Functions 1. len() - String Length text_variable = "Hello World"; string_length = len(text_variable); // Returns: 11 2. ...
    • Add IP Geolocation Data to Zoho Creator Records

      A web form gives you an email address and an IP. The IP is worth more than people think — it tells you the city, the country, the timezone to call in, and the ISP, which is often the difference between a real prospect and a bot. One request enriches ...
    • Work Around Deluge Iteration Limits in Zoho Creator

      Deluge caps how many records a single loop may touch. Hit that ceiling and your script stops part-way through, often without an error that makes the cause obvious. Two patterns get around it, and both work by making each individual loop smaller ...
    • Push Zoho Books Records into Zoho Creator with a Webhook

      Some data only exists on the Creator side — a tax identifier captured at signup, a project code, an internal reference. This pattern lets Zoho Books push an invoice into Creator by webhook, then writes the missing value straight back onto the Books ...
    • Zoho Flow Selective Updates - Complete Implementation Guide

      Creator Scripts Zoho Trusted Partner in Digital Transformation Zoho Flow Selective Updates - Complete Implementation Guide Executive Summary Challenge: Preventing Zoho Flow from overwriting existing Creator record data with blank values during ...