Validate records while importing data into a report

Validate records while importing data into a report

Hey Creators,

We are back with another post on Creator Simplified . Today, we will learn how to validate records based on a criteria while importing data into a report.

Use case:

Assume a scenario where there’s a requirement to import student records into the Computer Science department, but only students with a percentage of 60% or higher are eligible.

From a data that contains all student records, let's validate the data and import only the records with a score of 60% or above into the Computer Science department.

How to achieve this?

1. Create a validation script

To validate records during import, we must first verify the data entered upon form submission, since importing records is essentially the same as making entries on the form.
First, let's create a validation workflow to allow entries on the form only if the percentage of marks scored is 60% or above.



This condition validates if the value entered in the Marks field is less than 60, the form will not be submitted.
 

2. Importing data into the report

The next step is to import the records into the report.

By default, clicking the Import button in the report will import all records without any validation. This occurs because the script we defined does not execute during the import process. To enable scripting during data import, we must check the Execute Scripts box to allow the scripting to work. This option is used in cases where a specific validation rule or a business logic needs to be applied during the import process.



After importing, the student records with Marks less than 60% will be shown under failed records as "Failed data" as it doesn't match the criteria.


The remaining records that matches the criteria will be imported.


Also, selecting the execute script check box triggers and executes any type of scripts on "validation on form submission" workflow. 

That's all for today, we hope this post helped you learn how to validate records while importing data into a report.


Feel free to drop your suggestions/questions in the comments below and watch this space for more such posts.


    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



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