Link dropdown limit is 20


ERPNext: v12.28.0 (version-12)
Frappe Framework: v12.25.0 (version-12)

I am just busy setting up the education module. More specifically the Course template. I have
already defined my topics as well as my assessment critria.

On the course form, when I click on the topic drop-down, it gives me my topics, but only
20 of them. Is that hard-coded or a settings somewhere ?

I looked at the JS and PY files in the /doctype/course folder on the server but there is

I know I can get away by selecting “Advanced search” and then “more”, but it would be more
convenient not to have to do that.

TL;DR: The default limit of 20 is hard-coded in a variety of places, yes.

At some point, I remember spending a few hours bumbling through the piles of JS and Python code. And I had figured out how to change the drop-down limit. From a frontend perspective, there’s this little library called awesomplete that whenever you type, returns a list of matching values.

From the backend perspective, I recall it was pretty simple. Something as easy as LIMIT N; suffix on a SQL query. Where the value of N was defaulted to 20.

The challenge? There are quite a few Python and JS files with hard-coded numeral 20’s in them. Used in all kinds of ways: page lengths, limits, and more.

Which of the 20's are the important ones?

Who knows.

None of this is documented @johnlongland. In times of need, I put on my Software Archaeologist uniform. And then I go spelunking in Frappe code for an afternoon or three.
:pick: :snake: :gem:


Thank you @brian_pond for this.

Your charateristic comprehensive responses remind me of the days when I belonged to
GLUG … Gauteng Linux Users Group … when I was thrown into the deep-end into a
LINUX environment.

I just wanted to confirm that I am not missing a “setting” somewhere. Let me evaluate
the current operation. Its a little customization I did on the “Course” form where
I implement the “Assessment Criteria Group” and by doing that, group the
Assessment Criteria together and in the process reducing them for a particular
Course. But still they are more than 20. ( Perhaps I will make a posting about this
simple yet handy customization )

Perhaps its time for me to find a Software Archaeloist Uniform for myself ! :smiley: