Update a form using custom action (from another form's report)

Update a form using custom action (from another form's report)

Requirement  

Update a form using a custom action configured in another form's report.

Use Case

In an engineering college student management application, a student may withdraw at any time of the academic year. Whenever a student applies for withdrawal, it should update the record of the student with the relevant details.  

Steps to follow

1. Create the forms with the following details:
Form
Form Link Name
Field Type
Field Name
Field Link Name
Add Student
Add_Student
Email
Email
Email
Name
Student Name
Student_Name
Date
Date Of Birth
Date_Of_Birth
Single Line
Department
Department
Single Line
Course
Course
Drop Down
  • 2017-2021
  • 2018-2022
  • 2019-2023
  • 2020-2024
  • 2021-2025
Academic Year
Academic_Year
Drop Down
  • Active (Mark as default)
  • Inactive
  • Passed-out
Student Status
Student_Status
Multi line
If inactive, please enter proof of leaving
If_inactive_please_enter_proof_of_leaving
Date
Date Of Leaving
Date_Of_Leaving
Leaving Request
Leaving_Request
Lookup (Add_Student)
Student
Student
Date ( Initial Value - zoho.currentdate)
Request Date
Request_Date
Multi-line
Reason for leaving
 
Reason_for_leaving
Decision Box
Approved
Approved
Decision Box
Rejected
Rejected
 
Now, we shall hide the If inactive, please enter proof of leaving and Date Of Leaving fields and show them if the student status becomes Inactive. Set the Reason for leaving field in the Leaving Request form as Mandatory.
 
2. Create a workflow to hide the above two fields if the Student Status value is not Inactive.
 
3. Click Add New Action and enter the below code in the Deluge Editor:
  1. if(Student_Status != "Inactive")
  2. {

  3. //Hide the below fields if the Student Status is not inactive
  4.  hide If_inactive_please_enter_proof_of_leaving;
  5.  hide Date_Of_Leaving;
  6. }
This will hide the inactive fields when the form loads.
 
Only a student can raise the Leaving Request. So, let's create a workflow during the load of the Leaving Request to fetch the details of the current logged-in student and to disable it, so that there is no modification.
 
4. Next, let's create a workflow during the load of the Leaving Request form.
 
5. Click Add New Action and add the below code to find the current logged-in student.
  1. //Get the corresponding Add_Student record from the login details
  2. input.Add_Student = Add_Student[Email == zoho.loginuserid].ID;

  3. //Disable the field to prevent further modification
  4. disable Add_Student;

An action item will be created for every record in the Leaving Request form, which will allow for approval of the corresponding request and mark the student as Inactive.
 
6. We will list only the relevant records to the administrators. Add a filter to the Leaving Request report to show only those Leaving Requests that are not Approved.
 
7. Next, let's add a report workflow for the administrators to approve the Leaving Request for a student. Click on the Leaving Request report. Click Quick View. Navigate to Configure Fields > Add Fields > Add New Button. Name the Action Item 'Approve Leaving Request'.
 
8. We shall execute this action item after confirmation. Add the following confirmation message:
  1. Execute the Approve Leaving Request action for this record for this student -  ${Add_Student.Student_Name} ?

9. Name the workflow 'Leaving Requestand click Create Workflow.

10. Click Add New Action > Deluge Script > Create your own. Add the below Deluge code to update the leaving details in the Add Student form:
  1. //Fetch the corresponding Add_Student record
  2. student = Add_Student[ID == input.Add_Student];

  3. //Set the Date Of Leaving to the current date
  4. student.Date_Of_Leaving=zoho.currentdate;

  5. //Assing the Reason for Leaving 
  6. student.If_inactive_please_enter_proof_of_leaving=input.Reason_for_Leaving;

  7. //Mark the Student Status as Inactive
  8. student.Student_Status="Inactive";

  9. //Mark the current Leaving Request record to Approved
  10. input.Approved = true;

11. Let's add another script to send an email to the student once the Leaving Request is approved. Click Add New Action > Deluge Script > Create your own. Add the below Deluge code to notify:
  1. sendmail
  2. [
  3.  from :zoho.adminuserid
  4.  to :input.Add_Student.Email
  5.  subject :"Your Leaving Request is approved!"
  6.  message :"<div><br>Hi " + input.Add_Student.Student_Name + "<br/>We are so sorry to let you go. Your request is approved.</div>"
  7. ]

12. Click Create. This will create the action item.
 
13. Although optional, we can create an action item for rejecting the Leave Request in a similar fashion. We can set the Rejected field value accordingly and explain the reason for rejection in an email.

See how it works





        Create. Review. Publish.

        Write, edit, collaborate on, and publish documents to different content management platforms.

        Get Started Now


          Access your files securely from anywhere

            Zoho CRM Training Programs

            Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

            Zoho CRM Training
              Redefine the way you work
              with Zoho Workplace

                Zoho DataPrep Personalized Demo

                If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

                Zoho CRM Training

                  Create, share, and deliver

                  beautiful slides from anywhere.

                  Get Started Now


                    Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                    BOOK A SESSION







                                Quick LinksWorkflow AutomationData Collection
                                Web FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                Digital FormsMarketingForms for Small Business
                                HTML FormsEducationForms for Enterprise
                                Contact FormsE-commerceForms for any business
                                Lead Generation FormsHealthcareForms for Startups
                                Wordpress FormsCustomer onboardingForms for Small Business
                                No Code FormsConstructionRSVP tool for holidays
                                Free FormsTravelFeatures for Order Forms
                                Prefill FormsNon-Profit

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG

                                    All-in-one knowledge management and training platform for your employees and customers.

                                              Create. Review. Publish.

                                              Write, edit, collaborate on, and publish documents to different content management platforms.

                                              Get Started Now




                                                                You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                    Manage your brands on social media


                                                                      • Desk Community Learning Series


                                                                      • Digest


                                                                      • Functions


                                                                      • Meetups


                                                                      • Kbase


                                                                      • Resources


                                                                      • Glossary


                                                                      • Desk Marketplace


                                                                      • MVP Corner


                                                                      • Word of the Day


                                                                      • Ask the Experts


                                                                        Zoho Sheet Resources

                                                                         

                                                                            Zoho Forms Resources


                                                                              Secure your business
                                                                              communication with Zoho Mail


                                                                              Mail on the move with
                                                                              Zoho Mail mobile application

                                                                                Stay on top of your schedule
                                                                                at all times


                                                                                Carry your calendar with you
                                                                                Anytime, anywhere




                                                                                      Zoho Sign Resources

                                                                                        Sign, Paperless!

                                                                                        Sign and send business documents on the go!

                                                                                        Get Started Now




                                                                                                Zoho TeamInbox Resources





                                                                                                          Zoho DataPrep Demo

                                                                                                          Get a personalized demo or POC

                                                                                                          REGISTER NOW


                                                                                                            Design. Discuss. Deliver.

                                                                                                            Create visually engaging stories with Zoho Show.

                                                                                                            Get Started Now








                                                                                                                                • Related Articles

                                                                                                                                • Disable Action Items after n times

                                                                                                                                  Requirement A custom action created using an Action item on a report has to be disabled after it is triggered three times. Use Case We have an app to maintain customer invoices. After an invoice is created, the staff can email the invoice to the ...
                                                                                                                                • How to copy subform data to another subform using a report action

                                                                                                                                  The values in a subform of a record can be copied to another form's subform using Deluge within the report actions. This allows seamless transfer of subform data between forms, ensuring consistency. For example, consider a Zoho Creator resource ...
                                                                                                                                • Functionality-based URLs

                                                                                                                                  Overview In the topic Zoho Creator URL Patterns we learned about the default URLs to access a Zoho Creator application and its forms, reports and pages. In this topic, we will learn about the functionality based URLs to set default values for form ...
                                                                                                                                • Update an existing record using stateless forms

                                                                                                                                  Requirement   Use details specified in a stateless form to modify records in the main form. Use Case   In an order management system, a customer has placed an order and wants to cancel it. The administrators allow for cancellation by accepting the ...
                                                                                                                                • Understanding form workflows

                                                                                                                                  Form workflow refers to the workflow triggered when there is an activity on a form. The activities that you can perform on a form are listed below. Created - Create a new record in the form Created or Edited - Create a new record or edit an existing ...
                                                                                                                                  Wherever you are is as good as
                                                                                                                                  your workplace

                                                                                                                                    Resources

                                                                                                                                    Videos

                                                                                                                                    Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                    eBooks

                                                                                                                                    Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                    Webinars

                                                                                                                                    Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                    CRM Tips

                                                                                                                                    Make the most of Zoho CRM with these useful tips.



                                                                                                                                      Zoho Show Resources