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. 

      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

                              WCAG



                                        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

                                                                                                                          • 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 ...
                                                                                                                          • Understand subform field

                                                                                                                            The subform field enables you to display a form within a form. The form in which you add a subform is referred as the main form. Refer to the following sections to learn about subforms: Appearance When to use this field Understand adding a subform ...
                                                                                                                          • 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 ...
                                                                                                                          • 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 ...
                                                                                                                          • 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 ...
                                                                                                                            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