Display output of a function in ZML Snippet
Hi!
I have a function that counts "Yes" string occurrences from a collection of form records
- //Function to count "Yes" string from "ResponseField" Field in "CustomerSurvey" Form
- int CustomerResponse()
- {
- count = 0; //initialize variable
- for each rowVar in CustomerSurvey[ResponseField.contains("Yes")] //loop
- {
- count = count + 1;
- }
- return count;
- }
- //output: 200
I have called this function in <text> element in ZML Snippet as follows.
This snippet is used on a page in ZOHO Creator. The function and ZML Snippets resides in the same application.
- <% {
- %>
- <panel>
- .
- .
- ...
- <text marginLeft='0px' marginRight='20px' color='#00D9B1' size='36px' uppercase='false' underline='false' bold='true' italic='false' type='Text' bgColor='rgba(0, 0, 0, 0)' value=thisapp.CustomerResponse()
- .
- .
- ...
- </pc>
- </pr>
- </panel>
- <%}%>
However I get following error on the live app.
I am new to Deluge and ZML concepts. Any suggestion to solve this are welcome.
Thanks!