This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Descending Order By

scottmahr - Thursday, May 12, 2011 2:25 PM:

I would like to have the default display for my item type to sort in descending order based on a property, how do I pull this off?

 

Thanks,

 

Scott



RobMcAveney - Friday, May 13, 2011 11:45 AM:

The only way to do this currently is to write a simple OnBeforeGet that adds the orderBy attribute to the request, like this:

this.setAttribute("orderBy","myprop DESC");
return this;

There's an enhancement request in the system to provide an easier way to do it.  Not sure exactly when it will happen, but you can vote on it here: http://www.aras.com/plm-roadmap/.  Just search for Descending.



scottmahr - Friday, May 13, 2011 5:16 PM:

This might be a hack, but it is so cool you can pull it off so easily.  I am slowly figuring out the capabilities of the system, I am very impressed.  

 

Rob, thanks again for having a straightforward answer, 

 

Scott