← Back to team overview

dhis2-devs team mailing list archive

Feature Reqest

 

Order data elements based on "form name" if available first, then the "Data
element name" if not.

I see this in 2.20, 2.21, and 2.22

This is to avoid: spending many hours creating section forms or custom
forms when you want elements to appear alphabetically, but don't want to
put the particular sorting words in the DE names themselves (from
name:length concerns or specific naming conventions needed by the client
organization, etc...)

Example, here are three elements without a form name (this example is
extremely rudimentary, only made to purposely expose the sorting mechanism)

[image: Inline image 1]

Now I added some form names to the elements (tried in a completely
different browser to make sure all the cache was clear)

A = 2
B = 3
C = 1

[image: Inline image 2]
You can see they retained the DE name ordering, and now are pretty
complicated looking even for only three elements. Here is a redacted
example:

[image: Inline image 3]

I imagine this would just be an ORDER BY change somewhere deep in the code?
Or is it ordered by the javascript itself via the "Name" attribute?






*Timothy Harding*
Sr. Systems Analyst, BAO Systems
+1 202-536-1541 | tharding@xxxxxxxxxxxxxx | http://www.baosystems.com | Skype:
hardingt@xxxxxxxxx | 2900 K Street, Suite 404, Washington D.C. 20007

PNG image

PNG image

PNG image

PNG image


Follow ups