title: getting values from first categorized view column in typeAhead in XPages
body: <p>I would like to use typeAhead functionality in a inputBox. Values should get only the first categorized column( Column[0]); Because I have so many document belong to the same customer. I only need customer names as unique. Please find what i tried so far below. in this view only the first column is categorized. Others are not. 
  I think i miss something :( </p>
  
  <pre><code>&lt;xp:inputText id="inpCustomer" value="#{document1.CustomerName}"&gt;
  &lt;xp:typeAhead mode="partial" minChars="2" ignoreCase="true" var="lupkey" valueMarkup="true" id="typeAhead1"&gt;
                                  &lt;xp:this.valueList&gt;&lt;![CDATA[#{javascript:try
      {
          var procedureName = "fonck1";
          var searchOutput:Array = [];
          var v:NotesView = database.getView("(ctgViewName)");
          var nav:NotesViewNavigator = v.createViewNavFromCategory(lupkey);
          var viewEnt:NotesViewEntry = nav.getFirstDocument();
          var tmp:NotesViewEntry;
  
          while (viewEnt !== null)
          {  
              searchOutput.push(entry.getColumnValues()[0]);
              tmp = viewEnt;
              viewEnt = nav.getNextCategory();
              tmp.recycle();
          }
  
          var result ="&lt;ul&gt;&lt;li&gt;&lt;span class='informal'&gt;&lt;/span&gt;&lt;/li&gt;";
          var limit = Math.min(hits,200);
  
          for (j=0; j&lt;limit; j++) 
          {
              var name = searchOutput[j].toString();
              var start = name.indexOfIgnoreCase(lupkey)
              var stop = start + lupkey.length;
              name = name.insert("&lt;/b&gt;",stop).insert("&lt;b&gt;",start);
              result += "&lt;li&gt;" + name + "&lt;/li&gt;"; 
          }
          result += "&lt;/ul&gt;";
          return result;
      }
      catch(e)
      {
          print(e.toString());
          throw(e);
      }}]]&gt;&lt;/xp:this.valueList&gt;
                              &lt;/xp:typeAhead&gt;
                              &lt;xp:this.attrs&gt;
                                  &lt;xp:attr name="placeholder" value="Please enter customer name..." /&gt;
                              &lt;/xp:this.attrs&gt;
  
                      &lt;/xp:inputText&gt;
  </code></pre>