Search interface returning no records found

Search interface returning no records found

Hi,

I have built a search interface from two resources:
https://www.zoho.com/creator/help/tutorials/advanced-app-building.html#Create-sform
https://www.zoho.com/creator/help/application/search-interface.html

However it is returning no records found all the time, for any search text. 

below are my codes for the Search Page:

  1. htmlpage Search_Results(searchParam, sIndex, eIndex)
  2. displayname = "Kết quả tìm kiếm từ vựng"
  3. content
  4. <%{
  5. recLimit = 10;
  6. if(input.sIndex == null && input.eIndex == null)
  7. {
  8. stIndex = 0;
  9. endIndex = recLimit;
  10. }
  11. else
  12. {
  13. stIndex = sIndex.toLong();
  14. endIndex = eIndex.toLong();
  15. }
  16. WordOtherInfo = Words [Vietnamese.contains(searchParam) || Japanese.contains(searchParam) || Hiragana.contains(searchParam) || English.contains(searchParam)] range from stIndex + 1 to endIndex;
  17. srchCount = Words [Vietnamese.contains(searchParam) || Japanese.contains(searchParam) || Hiragana.contains(searchParam) || English.contains(searchParam)].count();
  18. prevStInd = stIndex - recLimit;
  19. prevEndInd = endIndex - recLimit;
  20. nextStInd = stIndex + recLimit;
  21. nextEndInd = endIndex + recLimit;
  22. ind = 0;
  23. if(srchCount > 0)
  24. {
  25. %>
  26. //Replaced a table from here

  27. //create a table to display the fetched records
  28. //"Search_order" is the stateless form link name
  29. <table>
  30. <tr>
  31. <td width="222px" valign="top">
  32. <div elName='zc-component' formLinkName='Search_order' params='zc_FtrClr=_ffffff&zc_InpFieldWidth=100&zc_Header=false'>Please Wait...</div>
  33. </td>
  34. <td>
  35. <table class="zc-viewtable" style="border:0px solid #75b5f2">
  36. <tr>
  37. <th> Kết quả tìm kiếm </th>
  38. </tr>
  39. <tr class="zc-row-header">
  40. <th class="zc-viewrowheader">Ngôn ngữ gốc</th>
  41. <th class="zc-viewrowheader">Tiếng Nhật</th>
  42. <th class="zc-viewrowheader">Hiragana</th>
  43. <th class="zc-viewrowheader">Tiếng Việt</th>
  44. <th class="zc-viewrowheader">Tiếng Anh</th>
  45. <th class="zc-viewrowheader">Lĩnh vực</th>
  46. </tr>
  47. <% for each  WordRow in WordOtherInfo
  48. {
  49. %>

  50. <tr class="zc-viewrow zc-row-1">
  51. <td><%=WordRow.Original_Language%></a></td>
  52. <td><%=WordRow.Japanese%></a></td>
  53. <td><%=WordRow.Hiragana%></a></td>
  54. <td><%=WordRow.Vietnamese%></a></td>
  55. <td><%=WordRow.English%></a></td>
  56. <td><%=WordRow.Tag%></a></td>
  57. </tr>
  58. }
  59. <tr></tr>
  60. <tr></tr>
  61. <tr></tr>
  62. </table>
  63. </td>
  64. </tr>
  65. </table>

  66. //To here

  67. </td>
  68. </tr>
  69. <tr><td colspan="2">  </tr>
  70. <%
  71. }
  72. %>
  73. <tr><td>
  74. <%
  75. if(stIndex > 0)
  76. {
  77. %>
  78. <div style="white-space:nowrap"><a href="/<%=zoho.adminuser%>/<%=zoho.appname%>/#View:Search_Results?searchParam=<%=searchParam%>&sIndex=<%=prevStInd%>&eIndex=<%=prevEndInd%>">Trước</a></div>
  79. <%
  80. }
  81. %>
  82. </td>
  83. <td>
  84. <%
  85. if(endIndex < srchCount)
  86. {
  87. %>
  88. <div style="white-space:nowrap"><a href="/<%=zoho.adminuser%>/<%=zoho.appname%>/#View:Employee_Search?searchParam=<%=searchParam%>&sIndex=<%=nextStInd%>&eIndex=<%=nextEndInd%>">Next</a></div>
  89. <%
  90. }
  91. %>
  92. </td>
  93. </tr>
  94. </tbody>
  95. </table>
  96. </td>
  97. </tr>
  98. </tbody>
  99. </table>
  100. <%
  101. }
  102. else
  103. {
  104. %>
  105. No Records Found
  106. <%
  107. }

  108. }%>

And the redirect code for the "Search" button on the Search Form:

  1. //redirect the form to HTML page named "Search_Results".
  2. //"keyword" is the declared parameter
  3. openUrl("https://creator.zoho.com/" + zoho.adminuser + "/" + zoho.appname + "/" + "#View:Search_Results?keyword=" + input.Keyword,"Same window");
  4. //Source: https://www.zoho.com/creator/help/tutorials/advanced-app-building.html#Create-sform

Both of these codes returned no errors when I saved them.

Anybody with ideas?