Create Serial Number for subform rows

Create Serial Number for subform rows

Requirement

Create serial numbers or auto-numbers for subform rows when a new row is added.

Use Case

In an employee management system, an employee can add up to five dependents. It will be easy for the employees if the dependents added in the subform are numbered automatically.
 

Steps to follow

1. Create the forms with the following details:
Form
Form Link Name
Field Type
Field Name
Field Link Name
Add Dependents
Add_Dependents
Number
S.No
S_No
Name
N ame
Name
Drop down
Relationship
Relationship
Date
Date Of Birth
Date_Of_Birth
Add Employee
Add_Employee
Name
Name
Name
Email
Official Email
Official_Email
Radio
Gender
Gender
Subform (Add Dependents)
D ependents - You can add upto 5 Dependents.
Dependents
 
Multiple fields can be added to the Add Employee form. We have added a smaller number for brevity.
 
 
3. Now, let's create a workflow to disable the S.No field in the Add Dependents subform during the load of the Add Employee form.
 
4. Add the below Deluge code in the editor:
  1. disable Dependents.S_No;

5. Now, let's create a workflow to calculate the serial number for the subform rows.


6. Add the below code in the Deluge editor:
  1. //Set the number of subform rows to 0
  2. recCount = input.Dependents.count();
  3. // Inform the employee that only 5 dependents can be added
  4. if( recCount == 5 )
  5. {
  6.   alert "This is the last dependent you can add. Please note that if you want to add a dependent, you have to remove one.";
  7. }
  8. //Set the current row's S.No value to the recCount
  9. row.S_No =recCount;
When a new subform row is added, the S.No field gets populated.

See how it works

 

Points to Note

  • Auto-number fields are not allowed inside subforms, so that there is no confusions when subform records are inserted. 

    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 Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Offline Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal

                          Form Designer HR

                          Card Forms Food
                          Assign Forms Photography

                          Translate Forms Real Estate
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            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

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      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 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

                                                                                                              • Add subform rows with dynamic data from another subform

                                                                                                                Requirement             Automatically add rows to a subform and populate it with dynamic data fetched from another subform. Use Case   A form named Orders Database contains customer details and their frequent orders in a subform. We have another ...
                                                                                                              • Auto-populate subform data from a form based on lookup selection

                                                                                                                Requirements Streamline the process of retrieving and displaying relevant data by auto-populating a subform based on the value selected in a lookup field. Use Case Consider an IT asset management application used by organizations to conduct asset ...
                                                                                                              • How to copy a 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 ...
                                                                                                              • Display subform's report in parent form's report

                                                                                                                Requirement   When the user views a particular record in a report that has subform, the values in the corresponding records are also shown. Use Case   An order management application contains two forms: Customers and Orders. The Customer s form is ...
                                                                                                              • Auto-calculating values on a subform's field

                                                                                                                Requirement Perform statistical operations on the numerical fields in subforms for analysis. Use Case  In an order management application, there are two forms, Order and Product. The Product form lists all the products in the inventory and the Order ...
                                                                                                                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