Most Used Sort option listview


For doctype list, how does the “Most Used” sorting option work?

And asc, desc is not applying when we use “Most Used”, so anyone knows details about this?

Short Answer:

  • When selected, the “Most Used” option will sort records using SQL column named ‘idx.’
  • The reason you are not seeing a difference between ASC and DESC? Probably because for your DocType, the idx = 0 for all records.

Longer Answer:

I do not believe the “Most Used” filter is actually working as intended/labeled.

In most DocTypes, the ‘idx’ column does -not- represent “usage”, “clicks”, or any other kind of activity.

The idx column usually represents a ‘Row Number’ or ‘Position’ within a list. For example:

  • Create a new Purchase Order, with 3 different Items.
  • Examine SQL table ‘tabPurchase Order Item’ for that new PO.
  • The records will have idx = 1, 2, and 3.

If the “Most Used” sort feature does actually work somewhere in ERPNext? Then I am not sure for which DocTypes that is true.

Thanks for the information. And I agree whatever you say. So, it seems this option is not that useful and even confusing for users.

Can we hide this option in order by?