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

        • Unapplied AP Credits not showing up on AP Detail Aging

          I am new to using Zoho Books. I was reconciling some accounts and found differences from the GL balance and AP Aging and it came down to unapplied vendor credits. Is there an option to include that on the report, so I can pull a matching AP Aging to the
        • Add Entry and Subform Record from Deluge Scripts

          Hi all,  I would like to know how do I add a new entry and also subform records from a deluge scripts.  I can use the insert into to add a new entry to a form, but how do i insert a collection into the subform of the entry? I am using a deluge script
        • Finding draft ticket replies

          Is there a way to see all tickets which have draft replies?
        • How to apply a tag to a ticket based on the to email address?

          I need to assign a tag to a ticket if the ticket was sent to a specific email address. For example, we have the email accounting[at]company.com forwarding into Zoho Desk. We would like all emails that were sent to this address to be tagged with an Accounting
        • Engineering Change Order Process using Tickets?

          Hi Zoho Community, I'm working with my company to create an Engineering Change Order/Request (ECO/ECR) process where engineers can internally create tickets for changes in a product that must be reviewed, approved and implemented by people or teams in
        • How can I move a ticket from Department A to Department B?

          Hi there, how do I move ticket from Department A to Department B? I went in the ticket and tried to scroll down the menu under the "department" but it won't let me, I am a support admin. Did I do anything wrong? or am I doing it in the wrong place?
        • Validation Rules Trigger on Untouched Fields

          In Zoho Desk, validation rules trigger for ALL fields during an update—even fields that weren't modified in the current edit. This behavior is fundamentally different from Zoho CRM and other Zoho products, where validation rules only apply to fields actually
        • How to work with getFieldNames formdata functions ,Any Examples

          I don't find any example showing usage of getFieldNames. Where do i find .is there any Help documents available
        • Zoho Notifications - Received two notifications for one message and none for the other

          We had a client reply to a ticket twice in one minute. The ticket owner received two emails for the second message but none for the first (which was crucial content and unfortunately was therefore missed). I'm assuming this created a race condition -
        • What is the difference between "Reply" and "Public Comment" in a ticket?

          Hey, my company is thinking about switching to Zoho Desk but we do not understand the difference between the "Reply" and the "Public Comment" feature. When should we use which? And why? What is the difference between them? Thank you for your help! Kindest
        • Tasks View for Opportunity/Jobs does not indicate "Related To" account

          How can ZoHo be setup so that when a task is created for an Opportunity, the subject automatically lists the underlying account? Right now, it's impossible to link the Account to the task when the task is created from the Job.  Therefore, the open task view is inadequate.  And it's a lot of maintenance to have to manually add the account to the subject...defeating the purpose of "Automated" workflow. 
        • can i show alert when i finish running the function?

          how i can show alert inside the custom function or popup notification. when i use alert inside the custom function it show this error Error at line number:  2 'ALERT' task can be used only in on load, on validate and on change actions ​
        • CRM calendar not syncing with Zoho Calendar

          The sync is not happening: This is my Zoho Calendar CalDAV synced with Outlook This is my Zoho CRM Calendar (sadly empty ...) I have enabled CalDAV Access. In Zoho Calendar, I have set up APP Calendar sync like this: What else can I check? Thank
        • Pipeline in Custom Modules

          I love the way the Sales Pipeline looks and functions with reports. I would like to add the save pipeline features and visualization to a custom module, however, I only see that these pipelines are only available for the Deals module. Is there a way to add pipelines to custom modules?
        • Cannot associate event with other objects when creating?

          I am attempting to associate an Event with one or more other objects when creating it via the API. According to the API docs, the "Related_To" property is a jsonobject even though the description says "Provide the details about the entities the event
        • How to disable subform records dynamically

          Hi Everyone I have a requirement to dynamically disable or hide subform fields based on certain criteria. However, the code I tried didn't work as expected. It either disabled or hid all the fields in all subform records or none at all. What I actually
        • Client Script Operate Timeout

          Hi Zoho, I have set a client script that use for ( i =1; length < i , i++) to fetch all of the product in order I have an order have 30+ products, seems this script will be stopped when it is checking rough 10 + products because of timeout (may be). May
        • Why and When to Manually Regenerate Reports?

          What is the protocol for needing to regenerate reports?  It is very confusing when data in reports pulls correctly sometimes, but are inaccurate other times.   Why is report regenerating necessary at all - can the report function not read the live data as inputted into the forms?  We have built lots of reports and it is very tedious and time consuming to have to regenerate the report before each use of that data to make sure it is accurate.  Is there a way to know when a report should or shouldn't
        • Import template from Zoho Writer

          I am trying to import a mail merge template - tried to import direct from my .docx file on my hard drive and the formatting went all over the place. I then imported the .docx file in my Zoho Docs and then fixed up the formatting within Zoho Writer. Can
        • Button Duplication when emails forwarded or replied

          When I create a new email template in campaigns and send it out it looks fine to all the users, however if that email is then on forwarded or replied to then all buttons within the email duplicate.  See below The one on the left is the original one.
        • Enhancements to Custom Connectors in Zoho Creator

          Hello everyone, At Zoho Creator, we believe in providing you with the necessary tools to achieve a well connected ecosystem of apps. Our Custom Connectors feature is a testament to this, enabling you to integrate with a wide range of external services
        • AutoScan Not Working Since April -Support says it with engineering

          Hi there, Autoscan has not been working on my account since April. Without this feature, completing expenses reports is laborious and error-prone. I keep asking for updates seeing as this is a critical feature, but told that it's being looked into and
        • Zoho books bulk update for invoices

          Hi Zoho team, Why only 25 invoices can be bulk update at a time. I am booking 800 to 900 invoices in a month. Please increase this limit? Please dont tell that you dont have enough request for this task. 25 limit for bulk update is too much low
        • Querying CloudSQL using NodeJS?

          How can I query CloudSQL over nodejs? Are there any rest apis from which I perform Select Queries in the data of a Workspace? In the v1 we had C#, Python, Java for CloudSQL Now I only see Java? I am confused about the overall API of Analytics, there any
        • Rename Record Templates in Zoho Creator

          Hi Team, I need to rename the Record Templates based on the name of the employee which i have configured in Zoho Creator Deluge Script. How to do this one? // Attachments :template:PDF_ECF:Exit_Clearance_Form input.ID as PDF
        • Les Zoholics 2025 sont de retour

          Bonjour à tous, Préparez-vous pour deux jours exceptionnels au cœur de l’écosystème Zoho ! Nous avons le plaisir de vous convier à Zoholics France 2025, un événement dédié à l’innovation, à l’expertise et à la communauté Zoho. Au programme : • Présentations
        • Salutation

          Hey there, I want to make an indvidual salutation. It is possible to use if statements in the email templates? For exampe: When is male then wirte "Dear Mr." else write "Dear Mrs." Thanks David
        • Personal Expenses

          I have reviewed the board and found a few scenarios like mine however not exactly so sorry if this is a re-post.  I just recently joined Zoho Books and had to go through 2000 transactions manually which took FOREVER. So the dilemma that I am facing is that I have attached my personal and business checking cards to my account because it was not until half way through 2015 that I decided to open up a business account as an independent contractor.  When I first started my account I placed the opening
        • Not receiving instagram verfication emails

          Hi- I'm not receiving Not receiving instagram verfication emails.  I have seen other users having the same issue and your answer was to contact instagram.  But instagram no longer has a support email.  
        • Change work hours per day for employees

          Hello, Is there a way to modify the work hours per day for employees in Zoho projects? This would be helpful for resource allocation to more accurately see when an employee who works 35 hours a week vs 40 hours has a full schedule. Thanks.
        • PROBLEMA AL CONECTAR EL DOMINIO

          hola buenas tardes hoy estoy tratando de crear mi registro y no me deja conectar el dominio  me dice que el dominio ya está vinculado a una cuenta y la verdad no tiene conectado el dominio a ninguna cuenta  tengo acceso al hosting y cpanel que se compro pero al revisar los dns estan apuntando al mismo hosting del panel  del proveedor del domini ... como hago para poder crear la cuenta con ese dominio, incluso cree un registro pero no  me deja vincularlo el dominio es integrasoft.co agradezco me ayuden  
        • Delay in delivery of emails

          I'm experiencing random delays for emails sent from Zoho account. Headers show that the message reached mx.zohomail.com almost instantly, followed by a delay of anywhere from 3-15 minutes (and counting). Please confirm whether this is a system-wide
        • Zoho Mail not working. Constant OTP

          Firstly, my emails have been playing up for over a year. They are struggling to send and I have to press Send a few time to make them going. They mostly hover with a loading note saying Sending. I emailed Zoho and they got it working, but now it is doing
        • Zoho Mail Storage Usage Discrepancy – Incorrect Storage Reporting

          Dear Zoho Support Team and Community, I previously raised a concern about inaccurate storage usage reporting in Zoho Mail but did not receive a clear or satisfactory response. To investigate further, I meticulously calculated the storage used by all folders
        • What Is ZOHO-Workplace? Why was I charged?

          Hi, Today my PayPal account was charged $12.72 for ZOHO-Workplace. The transaction ID is 15S32484H3826544W. What is this charge for? It is the first time I am seeing it.
        • Building a custom site

          do we have an option in Zoho to build custom sites like adding custom functionalities? want to make a site like https://trackscourier.com/jnt-tracking-ph/. Is it doable? Please assist.
        • Missing Payload Details

          Hi All, Does anyone know how to fix missing webhook payload data in the next step of the flow? Payload comes into the webhook -- All details here When i go to use the webhook data in the next step -- the majority of the payload data is missing
        • Numeric options in Decision

          Zoho really needs to add options for numeric comparisons in the Decision action. These are the ones that should be implemented: Greater than Less than Greater than or equal to Less than or equal to Equal to (although this is actually handled already)
        • Supercharge your VoC analyses with data from anywhere: Modules are now sources for VoC

          Dear customers, We hope you're well! Your customers talk about your brand, praise your service, criticize your offerings, or promote your business—literally from anywhere on the internet—and it has become strategically necessary to factor in all possible
        • Nouveautés Zoho Flow - Intégration SAP S/4HANA et SAP HANA

          Bonne nouvelle! Deux applications très attendues dans la galerie d’intégrations de Zoho Flow sont désormais disponibles : ✨ SAP S/4HANA ✨ SAP HANA Que vous gériez des opérations d’entreprise ou des systèmes de données, ces intégrations vous permettent
        • Next Page