Power of Automation :: Preventing Infinite Loops in Zoho Projects - A Smart Approach to Task Workflow Automation

Power of Automation :: Preventing Infinite Loops in Zoho Projects - A Smart Approach to Task Workflow Automation

Hello Everyone,

Today, we’re excited to share a smart solution to a common issue in Zoho Projects: Infinite loops caused by Task Workflow Rules and Custom Functions.

Use Case:

In a task layout, the two custom fields—
Gross Rate (GR) and Net Rate (NR) —are automated as follows:

  • When a user updates GR, the system updates NR using the formula
    NR = GR × 0.85
  • When a user updates NR, the system updates GR using the formula
    GR = NR / 0.85

The Problem : Infinite Loop

If each field update triggers a workflow, they will keep calling each other indefinitely, creating an infinite loop. Since Zoho Projects allows workflows to trigger one another, this can quickly become a serious issue.

The Solution: Break the Loop with a Simple Check

We can 
prevent these infinite loops by ensuring that an update only happens when necessary.

✅ Before updating a field, check if the new value is different from the existing value.
✅ Only proceed with the update if a change is actually needed.

Implementation Steps :

We have composed the custom functions which helps in updating these custom fields.

1️⃣ Calculate the new value using the custom functions provided.
2️⃣ Compare it with the existing value before calling the Update Task API.
3️⃣ Update the field only if the value has changed to prevent unnecessary API calls.

Example in Action:

  • Suppose you update GR to 1000 in the UI.
  • The system calculates NR as:
    NR = 1000 × 0.85 = 850
  • Before updating, it checks the existing NR value:
    • If NR is already 850, no update is made. 🚫 (Prevents infinite loop)
    • If NR is different, it updates to 850, triggering the next workflow.
  • When the second workflow recalculates GR, it compares the new value with the existing one. Since they match, no further update occurs—breaking the loop. ✅

    We have attached the required screenshots & custom function scripts for reference.

Final Thoughts:

By applying this simple check, we can ensure smooth automation in Zoho Projects while avoiding infinite loops. This approach not only enhances workflow efficiency but also prevents unnecessary API calls, improving overall system performance.

We hope you found this post useful. If you have any questions, feel free to share them in the comments below.


      • Sticky Posts

      • Introducing Version-3 APIs - Explore New APIs & Enhancements

        Happy to announce the release of Version 3 (V3) APIs with an easy to use interface, new APIs, and more examples to help you understand and access the APIs better. V3 APIs can be accessed through our new link, where you can explore our complete documentation,
      • Schedule Exports for Regular Project Updates

        Tracking project data often means exporting data at regular intervals. Instead of manually exporting data every time, users can schedule exports for Phases, Tasks, and Tasks in Zoho Projects. These exports can be set to run once, daily, weekly, or monthly
      • Set Custom Business Calendars and Holidays for Global Teams

        Managing a project across diverse teams means accounting for more than just tasks and deadlines; it means acknowledging how and when each team actually works. Users might follow different working days or observe region-specific holidays that cannot be
      • Restore Trashed Records Anytime Within 30 Days

        Access the recycle bin from the Data Administration tab under the settings page in Zoho Projects, which gives better control over the trashed data. When records like projects, phases, task lists, tasks, issues, or project templates are trashed, they are
      • Organize and Clone Task Custom Views

        We have rolled out two new enhancements to task custom views: Custom View Groups and Custom View Clone. Custom View Groups Similar to predefined view groups, we have introduced groups for custom views to help organize and categorize them. My Custom Views:

        • Recent Topics

        • What's New? - May 2025 | Zoho Backstage

          Hi everyone, A May-zing month for you! As summer rolls in and event season picks up the pace, we’ve been working on a set of updates in Zoho Backstage to help make your day-to-day life a little easier. This month’s improvements are all about tackling
        • Integrate Zia AI into Zobot with Support for Hebrew and Bot Context

          Dear Zoho SalesIQ Team, Greetings. We would like to submit a feature request that would significantly enhance the functionality and intelligence of Zobot: native integration of Zia AI into Zobot scripts and blocks—with full support for Hebrew language
        • Mail Merge: Need Transparent Background for Signatures

          I'm using ZohoCRM and Zoho sign to send documents to customers to sign. We use zohoCRM's "Mail merge" option to create the templates. The problem is that those "Signature" fields have a solid white background so it looks like a stamp on the page instead
        • Zoho Flows

          Basically I can't build a connection that works between Excel on OneDrive and Zoho. I wanted to have 1 flow checking on a row added to an excel file and then intiate an import of that row. I'm doing that manually now and thought that this could be automated.
        • Zoho time tracking with automated screenshots

          Time tracking option with automated screen shots would be an exeptuonally good feature, any plans to develop something like that?
        • Sharing my portal URL with clients outside the project

          Hi I need help making my project public for anyone to check on my task. I'm a freelance artist and I use trello to keep track on my client's projects however I wanted to do an upgrade. Went on here and so far I'm loving it. However, I'm having an issue sharing my url to those to see progress. They said they needed an account to access my project. How do I fix this? Without them needing an account.
        • Zoho Campaigns Forms not Responsive on Website

          I have a mobile responsive Zoho Sites website and when I add a Zoho Campaigns form, it is not responsive. I have used the website code and ensured that the 'responsive' checkbox is selected. But, the form is not responsive to mobile. I have attached a
        • Oldest mail on top?

          I am old, and probably missing something simple, but how do I flip my zoho mail so oldest mail is on top?  Thanks in advance, and a HUGE thank you to the entire ZOHO team.  You just keep getting better!
        • Desk API to add or change commenterId to a comment

          Please let me know how to add comments on tickets for different agents using the API. When adding a comment it will take commenterId but then ignores that and used the API agentId. Did not see in API docs which values are readonly. I pleased to see commentedTime worked for past times. Regards, Glenn
        • How send a ticket attachment using the Sendreply API in Zoho Desk

          API document references : you make use of the Upload file API and gather the attachment ID. This ID is be passed with the Send email Reply API to deliver responses with the attachment intact. Code template is as below: // ORGID ORGID = "XXXXXXX"; // Masked
        • First Insight - Find your Fields

          The Wheels of Ticketing - Desk Stories Find your Fields What are fields? Fields are crucial in ticketing modules that capture information about Tickets, Customers, Organizations, Products, and more. Depending on the kind of data being stored, users can
        • Automation#30: Auto-Update Time Entry to the Nearest 5 Minutes

          Hello Everyone, Time tracking is a feature in Zoho Desk to help businesses stay organized and efficient. For Zylker Techfix, this feature has helped to track the duration of gadget services to generate accurate bills. However, Zylker Techfix faced a unique
        • Email adding to existing ticket

          hello Is there some syntax i can add e.g. to the subject line / body of my email that when it reaches the Zoho portal will add the request to an existing ticket. e.g {123} Currently if i have an open ticket and a customer emails me direct, i then forward
        • How to define different shift timings for each weekday in Zoho People?

          Hi everyone, We’re using Zoho People for attendance tracking and need to configure a standard 39-hour workweek that is structured like this: Monday to Thursday: 8 hours per day Friday: 7 hours Currently, our service provider has set up the workweek as
        • add two date range

          Hi, How can I add two date range selections to compare two different column values in a single pivot view? I have attached a snap for your reference.
        • Announcing new features in Trident for Windows (v.1.26.5.0)

          Hello Community, Trident for Windows is here with exciting new features to elevate your email communication and enhance productivity. Let’s dive into what’s new! Open .eml files in Trident. You can now open .eml files directly using Trident. This makes
        • Adjust The max character in Specification Field

          Is there another way to adjust the maximum character limit for the Specifications field in Zoho Commerce? I need to accept responses with fewer than 200 characters.
        • Customize the Sign In And Sign Up in Zoho Commerce

          Is there another way to customize the Sign In and Sign Up in website Zoho Commerce like this i want to customize to edit it like change the "Sign In" word into "Login Zoho Commerce" it is possible or other way to do that?
        • Territories : Deluge and APIs

          I am trying to work out how to filter a deluge query by territory eg "SELECT Total_Amount, Stage, Closing_Date, Created_Time, Deal_Name FROM Deals WHERE Stage in (" + varBaseCriteria + ") AND Territory = 'Territory1'" The problem being that Territory
        • Tidying up messes file system on Site

          I'm been given access to a new site that's been managed by several different people over the years, each with different ways of managing images and files. If I move an image from one folder to another, it shows a missing image icon on the site's page.
        • Move Archive Button in Zoho Mail to Main Toolbar?

          Is there a way to add the Archive Button to this tool bar so I don't have to click the three dots every time?
        • Introducing Bigin 360: Our new pricing edition with increased feature limits and pre-installed toppings

          Dear Biginners Club, Today, we're pleased to launch a brand-new pricing edition called Bigin 360, our highest pricing edition that will sit on top of Express and Premier editions. It's been over four years since our launch, and we're receiving some great
        • URL field display value

          Is it possible to give a URL stored in a project a display value, rather than showing the whole url? I have a lot of projects connected to issues filed on a separate site, each with a distinct URL. For example: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40000
        • need payment link excl. TDS Amount.

          Dear Team Zoho, Kindly generate a payment link excluding TDS amount. So that TDS can be submitted through portal. Thanks & Regards, Arijit S.
        • CRM is very slow now

          CRM is very slow now. Plz check ASAP
        • Access error when running invokeurl

          Hi, I'm running the following code: string standalone.test_api() { LoroToken=zoho.crm.getOrgVariable("LoroToken"); info "LoroToken:"+ LoroToken; headersMap = Map(); headersMap.put("Authorization", "Bearer "+LoroToken ); headersMap.put("Content-Type",
        • Disable Column Freeze in PWA View but Keep It on Desktop — Zoho Creator Reports

          Zoho Creator offers a useful feature to freeze up to two columns in a report view, which works well on desktops. However, our users access the app on both laptops and mobile devices, and freezing columns makes reports nearly unusable on smaller screens.
        • How do I add more space to a note in ‘draw’?

          I’m taking handwritten notes using the draw note, but I don’t seem to be able to scroll down to get more room on the page. How do I make more room to take notes?
        • Overtime per week vs. per day

          In the United States 90% of the states calculate overtime as working more than 40 hours per week. It appears that Zoho People can only calculate overtime per day.  How do we fix this? Here is an example: Mon      8 hours Tues      7 hours Wed      9 hours Thur      8 hours Fri            8 hours -----       Total      40 hours (no overtime) However, Zoho people says 1 hours of overtime because the employee worked 9 hours on Wednesday. Maybe I have something setup wrong in Zoho People?  
        • Add Hebrew Language Support in SalesIQ Idle Chat Handling and Reminders

          Dear Zoho SalesIQ Team, Greetings. We would like to request the addition of Hebrew language support in the Idle Chat Handling and Reminders functionality within Zoho SalesIQ. 🗣️ Background & Use Case Currently, we have successfully configured our Zobot
        • notebook synchronization - problem

          Good afternoon, Since yesterday when trying to create a new notebook, it does not let me and when creating the notes they are not synchronized with the cloud, I think the error may be with the encryption of images because in the pages appears the image
        • Notebook 3.5.0 -- Sort order Name A-Z not working

          Just updated to Notebook 3.5.0 on Windows 10. Sort order by Name, A to Z is backwards, like Z to A. Selecting Z to A still works as expected.
        • Stay organized with chat-to-ticket timers

          Hi there! Ever lost track of a customer’s message? Or found yourself scrolling through long chat threads trying to figure out what’s what? Setting up a chat-to-ticket timer can help. It decides when a reply should stay in the old ticket or create a new
        • New notecards not syncing across devices

          Hi, I'm having the same problem where my notes are not syncing from my Android to my laptop. Please help
        • Please add custom sort in Windows ver. of Notebook!

          Dear Zoho, I love the custom sort (drag and order notes) in the Android version of Notebook, but when I sync onto the Notebook on Windows, the note orders all get messed up because it doesn't support custom sorting yet. This makes it impossible to do
        • Formula to return string "WK 26 - 6.2.25 - 6.8.25

          Here's what I've got but syntatic failure: if(not(isnull(${Deals.GS_Due})), "Week " + Tostring(ceil(dayofyear(${Deals.GS_Due}) / 7)) + " - " + Tostring(month(${Deals.GS_Due})) + "." + Tostring(day(${Deals.GS_Due})) + "." + Tostring(year(${Deals.GS_Due}))
        • Introducing LeadChain in Bigin to sync leads from Social Ads easily

          We're excited to introduce a new topping in Bigin called LeadChain by Zoho Social. LeadChain instantly syncs lead information from social media lead ads to Bigin, making it easier to turn them into customers. It also helps you send conversion data back
        • Templates Access

          There should be an option to grant users access to templates but not allow them to edit/delete templates. In setup there is only one tick option for templates. This will give any user access to view as well as delete/edit. This doesnt make sense as they
        • Generate a Zoho Sign link

          From time to time I get a response "I never received your you e-document for electronic signature" is there a way to generate a Zoho Sign link to share.
        • Power of Automation :: Autocomplete the Project upon Task closure.

          Hello Everyone, A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:
        • Next Page