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)

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

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:

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?

image

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

Hi Tim,
It seems like a nice feature. I guess you would like to have something here? To be able to sort data elements by something other than their name when creating a section?

Regards,

Jason

image

image

image

image

image

···

On Tue, Feb 9, 2016 at 5:34 AM, Timothy Harding tharding@baosystems.com wrote:

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)

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

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:

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@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049