cancel
Showing results for 
Search instead for 
Did you mean: 

Help: Incorrect Search results when using a custom view

oilg
Champ in-the-making
Champ in-the-making
Dear all,
My intention is to provide our users with different document views, depending on the documents attribute values of a custom aspect. I do so by putting custom views performing saved searches to spaces representing a "view-tree".

Unfortunately, my views do not return all documents. Does anyone have an idea what the problem might be?

Does anyone have a proposal how to cope with this requirement in a better way?

Below the code of one of the ftl:

<h3>Results for Status Approved</h3>
<table cellpadding=2>
   <tr>
      <td></td>
      <td><b>Name</b></td>
      <td><b>Author</b></td>
      <td><b>Process</b></td>
      <td><b>Created</b></td>
      <td><b>Changed</b></td>
      <td><b>Storage location</b></td>
   </tr>

<#list companyhome.childrenBySavedSearch["workspace://SpacesStore/90e34b0b-6531-11dc-a239-c5e6df8c822c"] ?sort_by(['properties','cm:modified'])?reverse as child>
      <#if child.isDocument>
          <tr>
            <td><a href="/alfresco${child.url}" target="new"><img src="/alfresco${child.icon16}" border=0></a></td>
            <td><a href="/alfresco${child.url}" target="new">${child.properties.name}</a></td>
       <td>${child.properties["cm:author"]}</td>
       <td>${child.properties["btcSmiley Tonguerocess"]}</td>
            <td>${child.properties["cm:created"]?datetime}</td>
            <td>${child.properties["cm:modified"]?datetime}</td>
            <td>${child.displayPath}</td>
         </tr>
      </#if> </#list>
</table>

Any help is very appreciated
Oliver
2 REPLIES 2

oilg
Champ in-the-making
Champ in-the-making
The malfunction does not occur when I don´t display custom - non Alfresco - values in the search result list. It may be that the error occurs as soon as an empty attribute value of one of the find items has to be displayed

kevinr
Star Contributor
Star Contributor
Can you post the actual error?

The malfunction does not occur when I don´t display custom - non Alfresco - values in the search result list. It may be that the error occurs as soon as an empty attribute value of one of the find items has to be displayed
This may be the problem, say ${child.properties["btcSmiley Tonguerocess"]} is null then the template will not work, you need something like this:

<td>${child.properties["btcSmiley Tonguerocess"]!""}</td>

Kevin