Forum Discussion

didonato's avatar
didonato
Ideator I
8 years ago

Sort Properties in Advance Search

It the Advance Search option, how are the Property values sorted?   Thanks

5 Replies

  • Hello, Please see the "Order By" column of the Properties tab of the ItemType in question to see which property(ies) will be used to sort the results of any search performed on that ItemType. For example, you will see that by default the item_number property on the Part ItemType has an "Order By" value of 1. If you would like to sort by multiple columns, you can set the "Order By" on any number of different properties. The sort order will be determined in ascending order. If you set the "Order By" of the name property to 2, the results of a search will first be sorted by the item_number and then by the name. You can also click the column headers of the search grid in order to sort the results after a search has already been run. Similarly, you can hold down the Ctrl key to pick multiple columns to sort the results by. Chris _______________________________ Christopher Gillis Aras Labs Software Engineer
  • Hi Chris,
    The sort I'm referring to is in a drop-down box 
    * Advanced Search
    * AML Search
    * Hide Search Criteria
    * Simple Search
    If I select "Advanced Search"
    then select a "Itemtype" 
    the "Property" drop-down is unsorted
     
  • Hello, Thank you for clarifying. The Properties dropdown is sorted alphabetically by the name of the Properties not by the Labels. Because of this, you may see some inconsistencies where it appears that the properties are out of order. For example, the "Template" property appears before the "Document Number" property. However, if we look at the names, we see that this is actually the is_template property being listed before the item_number property. You can find these names by default in the left-most column of the Properties relationship tab of the given ItemType. Chris _____________________________ Christopher Gillis Aras Labs Software Engineer
  • Hello, There does not appear to be an easy way to change the sort order of this properties dropdown. Additionally, changing the sort order to "label" will not solve the issue of the entries not being listed in alphabetical order if there are any properties that do not have a label. It is possible to create your own custom search mode. You can look at this Community Project for an example of how to accomplish this. It may be possible to copy all of the code from the Advanced Search Mode into a custom search mode and make edits in the copy to manually sort all of the properties before the dropdown is populated. However, I don't have any samples of how this would be done. I would recommend naming this copy such that it is distinct and obviously different from the normal Advanced Search Mode. Chris ______________________________ Christopher Gillis Aras Labs Software Engineer