How can I get the list of data in serial number order instead of alphabetical order?

I’ve created a doctype to add Month names and number of days in that month. Field names are Serial number, Month Name and Days in the month. I’m using this doctype as a link field in another doctype. But there the names are coming in Alphabetical order instead of serial number.

So, what I need to add or change to get the data in order by serial number?

Hi @Rahul_Singh:

As far I know, is not possible to change “order_by” from simple set_query.
You will need to override the query. Check this:

https://frappeframework.com/docs/user/en/guides/app-development/overriding-link-query-by-custom-script#2-calling-a-different-method-to-generate-results

Anyway, maybe you could change the identifier field (name) on your doctype, using the serial number, using title and search settings.

Something like this?
image

Can you share how your doctype is defined?