Save and Execute a message formatter custom function

Save and Execute a message formatter custom function

While creating a message formatter custom function, you can Save and Execute the provided code to see if it works properly.You can execute the code and provide an input of the base64 format and check if the desired output is generated.

If you have any trouble writing a message formatter custom function, reach out to support@zohoiot.com.

You can test a custom function only in the code editor. Here are a few ways to access the Code Editor of a custom function that is already created.
  • Access the Code Editor of a custom function in the End Application.
  • Access the Code Editor of a custom function in the Developer Application.
 
To save and execute a message formatter custom function,
  1. Write or Paste the required Javascript Lite Code in the Code Editor. For this example, a simple message formatter code for WS101 Milesight device is used.



  2. Click Save and Execute. A dialogue box to take input will appear.



  3. Provide the base64 message that will be sent as the payload by the device in the Raw Payload field and click Save. For this example, the payload AXUQ/y4B (Hex: 017510 FF2E01) is provided.



    NotesNote: Fport field is not mandatory.
The code will be executed, and the output will be displayed in a console pane.


If an error occurs in the executed code, the error message will appear in the Error Logs section of the console pane. To address the issue, correct the error and click Save and Execute again to re-run the code.

 
 


    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 FormsEnterpriseBegin 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 onboardingOrder Forms for Small Business
                          No Code FormsConstructionRSVP tool for holidays
                          Free FormsTravel
                          Prefill FormsNon-Profit

                          Intake FormsLegal
                          Mobile App
                          Form DesignerHR
                          Mobile Forms
                          Card FormsFoodOffline Forms
                          Assign FormsPhotography
                          Mobile Forms Features
                          Translate FormsReal EstateKiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for FormsAlternativesSecurity & Compliance
                          Holiday FormsGoogle Forms alternative GDPR
                          Form to PDFJotform alternativeHIPAA Forms
                          Email Forms
                          Encrypted Forms
                          Embeddable Forms
                          Secure Forms
                          Drag & drop form builder
                          WCAG



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

                                                                                                              • Testing a Message Handler Custom Function

                                                                                                                While creating a message handler custom function, you can test the function to see if the desired output is received. For testing, you can provide the expected value and see if the expected output value is obtained. For the message handler custom ...
                                                                                                              • Understanding message formatter and message handler

                                                                                                                In the Zoho IoT application, data sent from the gateway/smart device can be enhanced further. This includes decoding raw payload into a usable JSON format and performing additional computations and enrich by calling external API's. This is achieved ...
                                                                                                              • Testing State Memory Enabled Message Handler Custom Function

                                                                                                                With state memory enabled, you can store values that can be used in successive messages to handle the incoming messages. We will go through a sample code to understand how state memory works while creating a custom function. headerMap = ...
                                                                                                              • Adding a custom function in the end application

                                                                                                                A custom function can be added within the end application for a specific model or module. You can configure the custom function to meet the specific requirements of a trigger or feature. To create a custom function in the end application, Access the ...
                                                                                                              • Adding a custom function in the developer application

                                                                                                                A custom function can be added within the developer application for a specific model or module. You can configure the custom function to meet the specific requirements of a trigger or feature. Once created, this custom function will be available in ...
                                                                                                                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