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)                         


      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

                                                                                                                          • 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 ...
                                                                                                                          • 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 ...
                                                                                                                          • Understanding emailing data to form

                                                                                                                            A form is the component of your app (that you’ve built using Zoho Creator), through which your users can submit data. In addition to the default method of data entry where users access your form, enter data in the fields and submit the form, you can ...
                                                                                                                          • Understanding form builder

                                                                                                                            What does this page cover? Learn more about the form builder and how you can customize your form and its fields according to your business needs. Availability Forms built from scratch, by importing data, and from a template can be created in all ...
                                                                                                                          • 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 ...
                                                                                                                            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