Tip #31: Track delays and capture causes for delay using Client Scripts in Qntrl

Tip #31: Track delays and capture causes for delay using Client Scripts in Qntrl



Overcoming project delays is a major concern for many businesses. Most industries like IT, manufacturing, transport, and construction work on defined time lines and any delay in completion might lead to cost overrun, compromised reputation, or even failed projects. To overcome this, monitoring instances of delay regularly, right from the initial phases of a project is essential.
 
Automating delay management is a recommended step as it eases central monitoring and reduces errors. To automate delay monitoring, Qntrl supports SLAs for every single stage. But, if you want to track time delays beyond individual stages—for a group of stages or an entire card—Client Scripts can be of help.
 
Client Scripts are coded by users to process existing data or add additional validations to data available in Qntrl. Let us now calculate the time delay using Client Scripts.
 
Business case
Donelly Constructions uses Qntrl to track the progress of their construction activities. They require to calculate the time difference between 2 given transitions to monitor the delay. If the calculated time limit is higher than 72 hours, the field ‘Reason for delay’ must be mandated to be filled by the user while closing the card.

Solution
  • Create a form with 2 Date & Time fields.
  • Configure the blueprint transition’s After section with Update Fields to capture the time at which the transitions take place.
  • Code the Client Script to calculate the time difference between 2 transitions and if any delay is spotted, prompt the user to provide the reason for delay while performing the last transition.  

Sample configuration

Step 1: Create 2 Date & Time fields in forms to capture the completion time of transitions.
  • Here, 'Time of milling' and 'Time of testing' are the 2 fields used.
  • Turn off the visibility of these fields to restrict users from filling them during card creation.


Step 2: Record the exact completion time of transitions using Update Fields in Blueprints or Business Rules.
  • In the blueprint, configure the 2 transitions you want to find the time difference between with Update Fields in After section.
    • Note: Any 2 transitions other than the last transition can be configured here.
  • Set the action as ‘Time of milling’ = ‘Execution date’ and ‘Time of testing’ = ‘Execution date’.

  • In the final transition, configure During section with fields ‘Time of milling’, ‘Time of testing’, and ‘Reason for delay’ to prompt the user while closing the card.


Step 3: Find the time difference between 2 date and time fields,  Identify delay, and hold accountability using Client Scripts.

Configure the client script for the last transition with execution trigger as OnLoad.


  1. async function onLoad(forpage) {
  2.     //You can lock the fields to restrict users from changing the time value
  3.     current.Layout.Fields.<select-first-date-field-here> .lock();
  4.     current.Layout.Fields. <select-second-date-field-here> .lock();
  5.     var request_time = current.Job.getValue(current.Blueprint.Transition.Fields. <select-first-date-field-here> .id);
  6.     var finished_time = current.Job.getValue(current.Blueprint.Transition.Fields. <select-second-date-field-here> .id);
  7.     //Calculating the time difference and validate it
  8.         var difference = (finished_time.value - request_time.value) / (1000 * 60 * 60)
  9.         if (difference >= 72) {
  10.             current.Blueprint.Transition.Fields.<select-reason-for-delay-field-here>.setMandatory(true);
  11.             current.Blueprint.Transition.Fields. <select-reason-for-delay-field-here> .show();
  12.         } else {
  13.             current.Blueprint.Transition.Fields. <select-reason-for-delay-field-here> .hide();
  14.         }   
  15.     }




Here, when performing the final transition, if the time difference is greater than or equal to 72 hours, the field ‘Reason for delay’ is set to mandatory. Else, if the time difference is less than 72 hours, the field will not be prompted for the user.  



Let us know if this business case is useful for you. You can view more such sample client scripts in our KB. If you have any unique requirements, comment below or email us at support@qntrl.com.

    Access your files securely from anywhere







                          Zoho Developer Community






                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts



                                                          • Sticky Posts

                                                          • Tip #21: Increase user engagement using dynamic email content and attachments in Orchestly

                                                            Businesses often send out bulk emails like weekly newsletters, monthly event updates, promotional emails, surveys, beta access emails, product reviews, seasonal greetings, and so on. Even as the gist of these emails remain constant for all recipients, personalizations capture the audience’s attention and help brands connect with them.   Orchestly’s email templates allows you to draft and send dynamic emails with personalized content and attachments to internal and external users. Email templates
                                                          • Qntrl's 2023 year in review

                                                            This year has been all about analyzing our customer feedback and building a resilient and solution-driven product from it. As a result of this work, we're happy to announce that a whole new version of Qntrl is getting ready for release soon. This new
                                                          • Tip #61: 5 different ways to create Cards in Qntrl

                                                            Qntrl supports an array of features that covers everything required for business orchestration, from process automation to business advancement. Cards, being the elemental feature of Qntrl, record all the details of a particular task from the beginning
                                                          • Tip #17: Stay informed of significant business impact using Orchestly

                                                            With remote working becoming the new norm, leaders across sectors need to stay updated of their business performance in the market to aid business decisions. Instead of awaiting virtual meetings from sales and finance heads to put forth the business status, organization leaders can themselves dig into the system to keep an eye on their revenue generating customers or set up notifications to monitor major updates.   Orchestly recognizes such requirements and provides adaptable solutions for all business
                                                          • Onboard faster with Orchestly's Tutorials

                                                            We are actively rolling out new learning materials to assist our customers onboard at ease and automate their processes effortlessly. On that front, we recently launched Tutorials for Orchestly.   Tutorial is a step-by-step guide to help users familiarize the concepts of Orchestly and automate simple processes right from scratch. We’ve documented 3 such business processes viz. Order Manufacturing, Product Implementation, and Change Management.   We're looking forward to document more customer-centric


                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources


                                                                                            Zoho Writer Writer

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ





                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • When dispatched to crew, assigning lead missing

                                                                                                            Hello, For the past two or three weeks, whenever an officer assigns Service Appointment to a team, the lead person is missing from the assigned service list. Therefore, we have to reschedule the SA and then the lead person becomes visible in the assigned
                                                                                                          • Create Lead Button in Zoho CRM Dashboard

                                                                                                            Right now to create Leads in the CRM our team is going into the Lead module, selecting the "Create Lead" button, then building out the lead. Is there anyway to add the "Create Lead" button or some sort of short cut to the Zoho CRM Dashboard to cut out
                                                                                                          • Generate leads from instagram

                                                                                                            hello i have question. If connect instagram using zoho social, it is possible to get lead from instagram? example if someone send me direct message or comment on my post and then they generate to lead
                                                                                                          • I want to transfer the project created in this account to another account

                                                                                                            Dear Sir I want to transfer the project created in one account to another account
                                                                                                          • Inactive User Auto Response

                                                                                                            We use Zoho One, and we have a couple employees that are no longer with us, but people are still attempting to email them. I'd like an autoresponder to let them no the person is no longer here, and how they can reach us going forward. I saw a similar
                                                                                                          • Weekly Tips : Customize your Compose for a smoother workflow

                                                                                                            You are someone who sends a lot of emails, but half the sections in the composer just get in your way — like fields you never use or sections that clutter the space. You find yourself always hunting for the same few formatting tools, and the layout just
                                                                                                          • Problem Management Module

                                                                                                            I am looking for a Problem Management module within Zoho Desk. I saw in some training videos that this is available, and some even provided an annual price for it. I want an official confirmation on whether this is indeed available. This is not a particularly
                                                                                                          • Zoho Slowness - Workarounds

                                                                                                            Hi all, We've been having intermittent slowness and Zoho just asks for same stuff each time but never fix it. It usually just goes away on it's own after a couple weeks. Given that speed is a very important thing for companies to be able to keep up with
                                                                                                          • Custom Bulk Select Button

                                                                                                            Zoho CRM offers the ability to select multiple records and invoke a Custom Button This functionality is missing from Recruit Currently we can only add buttons in the detail page and list But we cannot select Multiple Records and invoke a function with
                                                                                                          • How to create a Zoho CRM report with 2 child modules

                                                                                                            Hi all, Is it possible to create a Zoho CRM report or chart with 2 child modules? After I add the first child module, the + button only adds another parent module. It won't let me add multiple child modules at once. We don't have Zoho Analytics and would
                                                                                                          • Zoho CRM still doesn't let you manage timezones (yearly reminder)

                                                                                                            This is something I have asked repeatedly. I'll ask once again. Suppose that you work in France. Next month you have a trip to Guatemala. You call a contact there, close a meeting, record that meeting in CRM. On the phone, your contact said: "meet me
                                                                                                          • Power of Automation :: Smart Ticket Management Between Zoho Desk and Projects

                                                                                                            Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
                                                                                                          • First day of trying FSM in the field.

                                                                                                            What we found. 1. with out a network connection we were unable to start a service call? 2. if you go to an appointment and then want to add an asset it does not seem possible. 3. disappointed not to be able to actually take a payment from within the app
                                                                                                          • BUG - Google Business Buttons - Add a button to GBP Post

                                                                                                            I am experiencing an issue with the "Add a button" feature when creating posts for my Google Business Profile (GBP) through Zoho Social. When I schedule or publish a GBP post and include a call-to-action button with a specific URL, the post itself publishes
                                                                                                          • Rich text Merge field - Not using font specified in HTML

                                                                                                            I have a rich text merge field in a writer template which is creating a table. I have chosen to use this method instead of a repeat region because I need to specify specific cell background colours which change every time the document is created. The
                                                                                                          • Support for Custom Fonts in Zoho Recruit Career Site and Candidate Portal

                                                                                                            Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to use custom fonts in the Zoho Recruit Career Site and Candidate Portal. Currently only the default fonts (Roboto, Lato, and Montserrat) are available. While these
                                                                                                          • CC and/or BCC users in email templates

                                                                                                            I would like the ability to automatically assign a CC and BCC "User (company employee)" into email templates. Specifically, I would like to be able to add the "User who owns the client" as a CC automatically on any interview scheduled or candidate submitted
                                                                                                          • Trying to export a report to Excel via a deluge script

                                                                                                            I have this code from other posts but it gives me an error of improper statement, due to missing ; at end of line or incomplete expression. Tried lots of variations to no avail. openUrl(https://creatorapp.zoho.com/<username>/<app name>/XLSX/#Report:<reportname>,"same
                                                                                                          • Zoho Reports Duplicating Entries

                                                                                                            I have a custom costing tab with a table where we entre invoices. These are under a Heading (PO Subject) and notes added in the form with different line items. In the reports, I have organised the report to group per PO Subject, with the total of the
                                                                                                          • Need help to create a attach file api

                                                                                                            https://www.zoho.com/crm/developer/docs/api/v8/upload-attachment.html Please help me to create it... It's not working for while. Do you have some example?
                                                                                                          • Export view via deluge.

                                                                                                            Hi, Is it possible to export a view (as a spreadsheet) via deluge? I would like to be able to export a view as a spreadsheet when a user clicks a button. Thanks     
                                                                                                          • how to add subform over sigma in the CRM

                                                                                                            my new module don't have any subform available any way to add this from sigma or from the crm
                                                                                                          • Organization Emails in Email History

                                                                                                            How can I make received Org Emails to show up here?
                                                                                                          • Outdated state in mexico

                                                                                                            Hello Zoho team, the drop down to add the state for customers, when they introduce their state in mexico has a city named “Distrito Federal” that name changed many years ago to “ciudad de mexico”. could you please update this so my clients can find the
                                                                                                          • Support new line in CRM Multiline text field display in Zoho Deluge

                                                                                                            Hi brainstrust, We have a Zoho CRM field which is a Muti Line (Small) field. It has data in it that has a carriage return after each line: When I pull that data in via Deluge, it displays as: I'm hoping a way I can change it from: Freehand : ENABLED Chenille
                                                                                                          • Possible to generate/download Quote PDF using REST API?

                                                                                                            See title. Is there any way after a quote has been created to export to a PDF using a specified template and then download it? Seems like something that should be doable. Is this not supported in the API v2.0?
                                                                                                          • Creating an invoice to be paid in two installments?

                                                                                                            Hi there, I own a small Photographic Services business and have not been able to find a way to fit my billing system into Zoho, or any other Accounting software. The way my payments work is: 1. Customer pays 50% of total price of service to secure their
                                                                                                          • Bug in allowing the user to buy out of stock items

                                                                                                            Hi i want to allow the user to buy out of stock items, according to the commerce documentation if i disable Restrict "Out of stock" purchases it will, but it doesnt work, so i want to know if it had any relation with zoho inventory, and if theres any
                                                                                                          • Zoho CRM Calendar | Custom Buttons

                                                                                                            I'm working with my sales team to make our scheduling process easier for our team. We primary rely on Zoho CRM calendar to organize our events for our sales team. I was wondering if there is a way to add custom button in the Calendar view on events/meeting
                                                                                                          • Replace Lookup fields ID value with their actual name and adding inormation from subforms

                                                                                                            Hi everyone,  I wanted to see if someone smarter than me has managed to find any solutions to two problems we have. I will explain both below.  To start we are syncing data from Zoho CRM to Zoho Analytics and I will use the Sales Order module when giving
                                                                                                          • Can a Zoho Sites page be embedded into another website (outside Zoho)

                                                                                                            Hi All, We have a request from a client - they'd like to take one of our information pages created in Zoho Sites and embed it into their own website? I was told through an email with Zoho that this was possible >>Thank you for your patience regarding
                                                                                                          • Bug in allowing the user to buy out of stock items

                                                                                                            Hi i want to allow the user to buy out of stock items, according to the commerce documentation if i disable Restrict "Out of stock" purchases it will, but it doesnt work, so i want to know if it had any relation with zoho inventory, and if theres any
                                                                                                          • Transition Criteria Appearing on Blueprint Transitions

                                                                                                            On Monday, Sept. 8th, the Transition criteria started appearing on our Blueprints when users hover over a Transition button. See image. We contacted Zoho support because it's confusing our users (there's really no reason for them to see it), but we haven't
                                                                                                          • Zoho CRM Sales Targets for Individual Salespeople

                                                                                                            Our organistion has salespeople that are allocated to different regions and have different annual sales targets as a result. I am building an CRM analytics dashboard for the sales team, which will display a target meter for the logged in salesperson.
                                                                                                          • Converting Sales Order to Invoice via API; Problem with decimal places tax

                                                                                                            We are having problems converting a Sales Order to an Invoice via API Call. The cause of the issue is, that the Tax value in a Sales Order is sometimes calculated with up to 16 decimal places (e.g. 0.8730000000000001). The max decimal places allowed in
                                                                                                          • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

                                                                                                            The address field will be available exclusively for IN DC users. We'll keep you updated on the DC-specific rollout soon. It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition. Managing addresses
                                                                                                          • Transfer all Related Data to new Account Owner

                                                                                                            Currently when I change the account Owner I only see the option to change only the open deals But I want the new account owner to take over all the related modules and all the deal stages Is it not possible right now? Am I missing something? Do I really
                                                                                                          • Can i connect 2 instagram accounts to 1 brand?

                                                                                                            Can i connect 2 instagram accounts to 1 brand? Or Do i need to create 2 brands for that? also under what subscription package will this apply?
                                                                                                          • How to Calculate MTTR (Mean Time to Resolve)

                                                                                                            We want to calculate MTTR (Mean Time to Resolve) in our Zoho Analytics report under Tickets. Currently, we are using the following fields: Ticket ID Ticket Created Time Ticket Closed Time Ticket On Hold Time We are planning to calculate MTTR (in days)
                                                                                                          • How to export project tasks, including the comments

                                                                                                            Hi, how can I export the project tasks, whereby I can also see the comments associated to a specific task? The use-case is that often we use comments to discuss or update a task related ideas. I would like to export the tasks, where we can also see the
                                                                                                          • Next Page