Calculations on data entered in a form

Calculations on data entered in a form

Requirement

Values entered in a form for a US Gallons field are used to calculate the corresponding value in UK Gallons. Similarly, values entered in a Miles field are used to calculate the corresponding values in kilometers.

Use Case

When a vehicle/fleet management system is used across multiple countries, the measuring units vary a lot. This system contains a Vehicle form, which holds the details of the vehicles in the business, and Vehicle Usage Stats form, which handles the travel and fuel consumption details of a vehicle. When showing stats like fuel consumption or distance traveled, there may be a need to show the data in both US and Imperial systems to better understand the volume of resources used.

Steps to follow

1. Create two forms with the following details:
Form
Form Link Name
Field Type
Field Name
Field Link Name
Vehicle
Vehicle
Single Line
Vehicle Name
Vehicle_Name
Drop Down
Fuel Type
Fuel_Type
Number
Registration Number
Registration_Number
Vehicle Usage Stats
Vehicle_Usage_Stats
Lookup (Vehicle)
Vehicle Name
Vehicle
Date
Date of Travel
Date
Decimal
Fuel (in US Gallons)
Fuel_in_US_Gallons
Decimal
Distance (in miles)
Distance_in_miles

2. Add a formula field in the Vehicle Usage Stats form with the below expression. Rename this formula field to Fuel (in UK Gallons).
  1. //Taking the value in the Fuel(in US Gallons) field, we are converting it to UK Gallons by dividing the former with 1.201
  2. input.Fuel_in_US_Gallons / 1.201

When the fuel consumption is added or updated, the values will get recalculated.

3. In the same way, add a formula field in the Vehicle Usage Stats form and add the below expression to it. Rename this formula field to Distance (in Kilometers).
  1. //Convert miles to kilometers by multiplying miles value with 1.609
  2. input.Distance_in_Miles * 1.609

4. Check the Make field visible in the form checkbox in the Field Properties of both Formula fields to see the values on the form.

See how it works

 

Points to Note

  • The values from the formula field can also be rounded to two decimal places using the expression below: 
  1. round(input.Fuel_in_US_Gallons / 1.201,2)                         


    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







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                  • Related Articles

                                                                                                  • Fleet Hub Management

                                                                                                    This app is published in accordance with Marketplace review process. For pricing details, you can refer to this page. Category: Logistics Vendor: Zoho Corporation Pricing: Free Overview Your one-stop shop for all your fleets' management needs! This ...
                                                                                                  • Understand Lookup Field

                                                                                                    Understand Lookup Field The lookup field enables you to create a relationship between forms. Using this relationship you will be able to lookup data from another form in the same application or from a form in a different application in your Zoho ...
                                                                                                  • Auto populate a field based on the selection from a lookup dropdown

                                                                                                    Requirement   When a value is chosen from a lookup dropdown, related values are populated in the other fields of the same form. Use Case   An order management app contains a form to store order details. When the admin chooses the customer name from ...
                                                                                                  • Understand formula field

                                                                                                    The Formula field enables you to automatically generate a value for each record in your form, based on a predefined expression. Let's take an example. The Total Amount in an Order form is calculated based on the Unit Price and Quantity of the ordered ...
                                                                                                  • Formula calculations

                                                                                                    FormUtil This util lets you manage the different functionalities in a form. Note: Zoho Creator's Mobile SDK is currently a Beta feature. We do not recommend using it for apps in the production stage. Formula Executions in Java ...
                                                                                                    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