Sorting by call number

In Endnote I used the Record Number to name my pdf files. In zotero I exported the Record Number as a Call Number. However, sorting in zotero by call number results in:

1 < 12 < 2 <23

whereas I'd like

1 < 2 < 12 < 23

Any way to solve this other than adding 0's before the numbers?

Thanks
  • Hi,

    Same problem here. As the library consists of several thousands of documents, I was hoping that there is another way to fix this than adding 0's manually. Any solution?

    Thanks
  • Here is how I would handle the situation (there might be a better way).

    Using Execute JS in Firefox and the Zotero Javascript API (https://www.zotero.org/support/dev/client_coding/javascript_api), you can batch edit your files.

    You can search for files with each each call number and replace the current call number with one with leading zeros. To speed up the process, once you see that the replace function works as you like, you can turn off the alerts and run the function in a loop for each of the remaining values.
  • I do think we should fix this, but I don't know how hard that is going to be. It's on my general list of things I'd like to look at, but depending on how complex this turns out to that may not happen any time soon. My guess would be that the real challenge are mixed strings. (sth. like Vol. 12 vs. Vol. 2). I think pure numerical strings should be easy, javascript has a standard function for that.
Sign In or Register to comment.