Description
If you have a Reference field on a form and you use a choice list under "Choice", you cannot sort using the attribute ref_ac_order_by on the dictionary entry. It always sorts alphabetically regardless of any dictionary attributes.
Steps to Reproduce
- Create new table named toys with the fields Name and Order.
Ensure that you name the column order and not u_order or the dictionary attribute will have to be adjusted. - Insert some names and orders that are not in line with their alphabetical sorting.
See attached screenshot as an example. - Go to incident.do.
- Personalize the dictionary by adding a new one with the following attributes:
- Table: incident
- type: Reference
- Column Label: toys
- Column name: u_toys
- Display: true
- Reference: toys
- Choice: Dropdown with -- None --
- attributes: ref_ac_order_by=u_order
- Go to incident.do.
- Click toys dropdown.
The sort is alphabetically no matter what you do to the order.
Workaround
Use the attribute [ref_sequence] instead of [ref_ac_order_by].
Replace:
ref_ac_order_by=u_order
With:
ref_sequence=u_order
Related Problem: PRB590252