Search Page

Search Page

I am trying to add a search function based on the instructions at  https://www.zoho.com/creator/help/tutorials/advanced-app-building.html

I believe the first part is working as it opens the html page with the word that is typed in the search box e.g. #View:Search?searchword=skills

However, I cant get any results to be listed. I have copied the sample code as below;


//pass the parameter (searchword) from stateless form (Aistear­_Links)

//fetch the record from "Aistear" form (Aistear), fields = Category, Learning_Goal


htmlpage Search(searchword)

<%{

    word = Aistear[Learning_Goal == input.searchword];

                message = "";

    if (word.count()>0)

{

                for each x in word.Learning_Goal

                message = "message + x.Learning_Goal

}%>


<table>

<tr>

<td width="222px" valign="top">

<div elName='zc-component' formLinkName='Aistear_Links' params='zc_FtrClr=_ffffff&zc_InpFieldWidth=100&zc_Header=false'>Please Wait...</div>

</td>

<td>

<table class="zc-viewtable" style="border:0px solid #75b5f2">

<tr>

<th>Search Results</th>

</tr>

<tr class="zc-row-header">

<th class="zc-viewrowheader">

Category

</th>

<th class="zc-viewrowheader">

Learning Goal

</th>

</tr>

<tr class="zc-viewrow zc-row-1">

<td><%=word.Category%></a></td>

<td><%=message%></a></td>

</tr>

<tr></tr>

<tr></tr>

<tr></tr>

</table>

</td>

</tr>

</table>             

 

//display error if no records found

<div style="text-align: center;">&nbsp;</div> <%}

else if ((input.searchword != null) && (input.searchword.length() > 0))

{%>

<h2>Name Not Present</h2>

<%}

}%>


The code returns a 'null' error.

Where am I going wrong?