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
  • Hi Chris,

    interesting that also Aras worked on the "onGet" ItemType use case. It sounds identical to the use case discussed in this thread:

    https://community.aras.com/f/development/3496/how-to-create-a-new-part-toc-menu-item-that-does-a-custom-search

    How does Aras solved the CUI button problem? I met one Aras employee who used my fabulous CUI button concept for a customer solution, but I do not know what he has changed or improved. What kind of concept did you use in your project? Something similar or were you able to find a better approach?

  • Hi Angela,

    The project I mentioned in this comment had very simple requirements. In my case, all I needed was to have a view-only way of seeing the different classifications, so I did not need to worry about making sure the NewEdit, or Delete buttons pointed to the actual ItemType.

    Do you happen to remember who you spoke with? I can check in with them to see if they made any updates or improvements to your concept of using custom CUI buttons in these kinds of views.

  • Ah ok! Of course for a view-only use case you don´t need to take care for the UI elements.

    Your colleague I met was the same that presented the original onGet idea. So I was happy that he liked the CUI concept.

    Some remarks: I currently use the following version of the above code, as the original version can produce a few strange side effects in certain scenarios

    this.setAttribute("type", "Document");
    Item res = this.apply("get");
    if(res.isError())
    {
      return this;
    }

    return res;

Reply
  • Ah ok! Of course for a view-only use case you don´t need to take care for the UI elements.

    Your colleague I met was the same that presented the original onGet idea. So I was happy that he liked the CUI concept.

    Some remarks: I currently use the following version of the above code, as the original version can produce a few strange side effects in certain scenarios

    this.setAttribute("type", "Document");
    Item res = this.apply("get");
    if(res.isError())
    {
      return this;
    }

    return res;

Children
No Data