Custom Fields Sorting in Item Custom Tab

1 view
Skip to first unread message

Phil -- wbtc.fr --

unread,
Aug 8, 2011, 9:13:53 AM8/8/11
to in-por...@googlegroups.com
I didn't found the thread about it, but I really don't understand how the fields are sorted for displaying.

It seems it's a mix of custom field name + Field Label + Heading and maybe field prompt?

I've created 15 fields, named ndp_1 to ndp_15, and while they appears under the same title thanks to identical Heading name, they are not at all in alphanumerical order... then which parameter is used here to display them?

Alexander Obuhovich

unread,
Aug 8, 2011, 11:02:49 AM8/8/11
to in-por...@googlegroups.com
There is "Priority" field in each custom field, that defines sort value for each custom field.

Custom fields are spitted into several groups based on their heading. Then within each groups they are sorted by DisplayOrder field. 

When custom fields with identical heading have same display order, then they will be sorted by custom field ID (latest created custom field will be at the end of the list).



Phil -- wbtc.fr --

unread,
Aug 8, 2011, 11:21:17 AM8/8/11
to in-por...@googlegroups.com
thanks for this info !

2011/8/8 Alexander Obuhovich <aik....@gmail.com>

Phil -- wbtc.fr --

unread,
Aug 9, 2011, 6:01:45 AM8/9/11
to in-por...@googlegroups.com
after my tests, here is a bug saw in 513: Display order value affects also Custom fields listing in grids, overriding all other sortings we could request by clicking on top column green mark.

2011/8/8 Phil -- wbtc.fr -- <ph...@wbtc.fr>

Alexander Obuhovich

unread,
Aug 9, 2011, 7:08:14 AM8/9/11
to in-por...@googlegroups.com
I see that now.

We should only apply DisplayOrder forced sorting when custom field value is entered or General or Custom tabs.

Developer Note:
Apply sorting only when $event->Special is "general" or "all". In all other cases sort by FieldName ASC and administrator can change to whatever he needs.

Phil -- wbtc.fr --

unread,
Aug 9, 2011, 9:09:26 AM8/9/11
to in-por...@googlegroups.com
note: display order value should be unique for all customs fields, because it's not only the display order in the group, but for all the custom field tab.
We should check for unique value entered, don't you think so?

the very best thing would be to let admin enter values from grid, because it's the place where we can have a global view about sorting... but that's another thing...

2011/8/9 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Aug 9, 2011, 9:34:33 AM8/9/11
to in-por...@googlegroups.com
note: display order value should be unique for all customs fields, because it's not only the display order in the group, but for all the custom field tab.
We should check for unique value entered, don't you think so?

If unique, then unique within same heading. And if admin changes heading of custom field, then he won't be able to save it all, since it won't be unique anymore at new heading.
I won't that fast to add unique checks here. That DisplayOrder is same as Priority for category items. Do you want to introduce unique there for the same reason?

Phil -- wbtc.fr --

unread,
Aug 9, 2011, 10:20:20 AM8/9/11
to in-por...@googlegroups.com
I get your point, here is the problem:

-create a new heading
-insert 3 values, with display order set as 1,2,3
-because we have in default install 1,2,3 values, then the result is a heading with only 2 values, and the third one appears alone

in other words, we can't have 2 times the same display property, otherwise it breaks the display system in tab


2011/8/9 Alexander Obuhovich <aik....@gmail.com>
Reply all
Reply to author
Forward
0 new messages