Location Based Check in/out Using Geo-fencing

Location Based Check in/out Using Geo-fencing

Requirement

Restrict access to a Zoho Creator form when it is accessed outside the specified geographical boundary, using geo-fencing.

Use Case

Consider an organization which uses Zoho Creator application for employee management. This application includes a form to track check-in and check-out activities. By enabling Geo-fencing within this form, it ensures that only employees physically located within the designated office area can check-in, effectively preventing any unauthorized or fraudulent entries.

Steps to Follow

  1. Create a from with the following details to collect the Check In and Check Out data of the employees.

    Form

    Form Link Name

    Field Type

    Field Name

    Field Link Name

     

     

     

    Check In/Out

     

     

     

    Check_In_Out

    Drop Down

    Check In/Out

    • Check In

    • Check Out

    Check_In_Out

    Email

    Email

    Email

    Date_Time

    Check In Time

    Check_In_Time

    Date_Time

    Check Out Time

    Check_Out_Time

    Drop Down

    Status

    • Checked In

    • Checked Out

    Status

  2. Navigate to the form properties by clicking on the settings icon () in the top-right corner.

  3. Rename the Submit button to Confirm and hide the Reset button by clicking the Click to hide () icon.

  4. Enable Geo-fencing in the form properties. A pop-up will be shown to configure geo-fencing.

  5. Select the desired location on the map or search for the location by typing the address in the Address field.

  6. Adjust the radius according to your preference. In this example, we have set it to 1 mile.

  7. Customize the default error message for geo-fencing to align with your preferences, conveying to users attempting to access the form outside the geo-fenced region.

  8. Create a page named Employee Check_In/Out.
  9. Embed the Check In/Out form into the page and customize the remaining page depending on your preference. Here, we have additionally embedded the Check In/Out Report.

  10. Create a workflow to execute on validation of Check In/Out form submission to auto capture the check in and check out time of the employee and name the workflow Auto Capture Time.

  11. Add the following code in the Deluge editor.
    1. //Fetch the attendance record of the logged in user for the day.
    2. var = Check_In_Out[Check_In_Time == today && Email == zoho.loginuserid];
    3. If there are no matching records when the user checks in, autofill the field with the current check in time, user email, status as "Checked In," and reset the Check In/Out field.
    4. if(var.count() == 0 && Check_In_Out == "Check In")
    5. {
    6. input.Check_In_Time = zoho.currenttime;
    7. input.Email = zoho.loginuserid;
    8. input.Status = "Checked In";
    9. input.Check_In_Out = "";
    10. }
    11. //If the checked in user tries to check in again on same day, show alert message and cancel form submission.
    12. else if(var.count() > 0 && var.Status == "Checked In" && Check_In_Out == "Check In")
    13. {
    14. alert "You've already checked in";
    15. cancel submit;
    16. }
    17. //If the user checks out, update the existing record with the current check-out time, user email, status as "Checked Out," and reset the Check In/Out field.
    18. else if(var.count() > 0 && var.Status == "Checked In" && Check_In_Out == "Check Out")
    19. {
    20. var.Check_Out_Time=zoho.currenttime;
    21. var.Email=zoho.loginuserid;
    22. var.Status="Checked Out";
    23. var.Check_In_Out="";
    24. }
    25. //If the checked out user tries to check in again in the same day, update the status to "Checked In" and clear the Check Out Time field.
    26. else if(var.count() > 0 && var.Status == "Checked Out" && Check_In_Out == "Check In")
    27. {
    28. var.Status="Checked In";
    29. var.Check_Out_Time=null;
    30. }
    31. //If the checked out user tries to check out again on same day, show alert message and cancel form submission.
    32. else if(var.count() > 0 && var.Status == "Checked Out" && Check_In_Out == "Check Out")
    33. {
    34. alert "You've already checked out";
    35. cancel submit;
    36. }
  12. Create another workflow to execute on the successful submission of Check In/Out form and name the workflow as Preventing Empty Record Entry. This workflow safeguards against the creation of multiple records when users attempt to check in or out.

  13. Add the following code in the Deluge editor.
    1. //If the Check In/Out field has not been reset in the previous "Auto Capture Time" workflow, delete the corresponding record.
    2. if(input.Check_In_Out == "Check Out" || Check_In_Out == "Check In")
    3. {
    4.  delete from Check_In_Out[ID == input.ID];
    5. }
  14. Create another workflow to hide the auto populated Check In Time, Check Out Time, Email, and Status fields of the Check In/Out form and name the workflow as Hide Fields.

  15. On the subsequent page, click Add New Action, choose Hide fields, set this action to run always, and select the Check In Time, Check Out Time, Email, and Status fields.

See How It Works


  1. Geo-fencing

    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











                                        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

                                                                                                          • FAQs: Capture Location - Location Data

                                                                                                            This page covers everything you need to know about managing geolocation data capture on your website forms, from informing users about location tracking to enabling and disabling the feature as per consent and privacy regulations.covers What is ...
                                                                                                          • Define geo-fence

                                                                                                            Restrict form entries by defining a geo-fence Refer to this page to learn about defining a geo-fence for a form. Open the form builder. Click the Properties icon in the top-right of the form builder, as shown below. The Form Properties will appear on ...
                                                                                                          • Capture geo coordinates

                                                                                                            Manage capturing geo coordinates of address Refer to this section to learn about the Capture geo coordinates property of the Address field. Open the form builder. Select the address field. The Field Properties pane will appear on the right. Check the ...
                                                                                                          • Adjust location

                                                                                                            Manage adjusting location of address on map Refer to this section to learn about the Adjust location on map property of the Address field. Open the form builder. Select the address field. The Field Properties pane will appear on the right. Check the ...
                                                                                                          • Check-in and Check-out Extension

                                                                                                            Overview The Check-in and Check-out extension helps organizations track the attendance and working hours of their employees. This widget typically includes a user interface where employees can register their arrival and departure times, and calculate ...
                                                                                                            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