Saved Search

I have the following criteria specified for a Saved Search. Unfortunately it returns/displays all default Document columns (50+). Was hoping it would just return and display the columns specified in the Saved Search criteria. Am I doing it wrong? <Item type="Document" action="get" page="1" pagesize="500" maxRecords="" select="project,doc_no,description,source,reference,doctype"><doctype condition="eq">Manual</doctype></Item>  
Parents
  • Hello, I've worked on a project with a similar use case before, and the solution we came up with may work for you as well. We wanted each classification of an ItemType to have it's own view in the main search grid. What we did was create a new ItemType that corresponded with each classification. We added properties to this new ItemType that matched the property names of the original. We then created an onGet Server Event on this new ItemType with code like the sample below.
    this.setAttribute("type", "Document");
    // You can modify the query here if you want to limit the items returned
    // e.g. this.setProperty("classification", "Drawing");
    return this.apply();
    Using an onGet event like this allowed us to override the query that gets the items and instead tell the query to return Document ItemTypes. You can then customize the properties displayed on the grid by setting the Hidden flag on your properties on the new ItemType. Chris
    Christopher Gillis Aras Labs Software Engineer
Reply
  • Hello, I've worked on a project with a similar use case before, and the solution we came up with may work for you as well. We wanted each classification of an ItemType to have it's own view in the main search grid. What we did was create a new ItemType that corresponded with each classification. We added properties to this new ItemType that matched the property names of the original. We then created an onGet Server Event on this new ItemType with code like the sample below.
    this.setAttribute("type", "Document");
    // You can modify the query here if you want to limit the items returned
    // e.g. this.setProperty("classification", "Drawing");
    return this.apply();
    Using an onGet event like this allowed us to override the query that gets the items and instead tell the query to return Document ItemTypes. You can then customize the properties displayed on the grid by setting the Hidden flag on your properties on the new ItemType. Chris
    Christopher Gillis Aras Labs Software Engineer
Children