Preserve selection order in API for "Select from List" field

Cristiano Nicolò, modified 1 Month ago.

Preserve selection order in API for "Select from List" field

New Member Posts: 2 Join Date: 4/24/20 Recent Posts

In Web Content Structures, when using a "Select from List" field with multiple selection enabled, the UI allows users to visually reorder selected items. However, the current behavior does not preserve this order when retrieving the values via API.

This is particularly problematic when editors rely on the selection order to define the display or processing logic downstream. For example, in our case, the selection order (e.g., priority_per_price, date_rt, product_name, priority, price_desc, price_asc) was meaningful and used in production systems to drive sorting behavior.

We have confirmed that in Liferay 7.4 q1.0 2025, the order is not preserved and appears to be stored arbitrarily, which breaks the expected functionality after recent upgrades. The visual reordering in the UI is not reflected in the actual stored data or API response.

This behavior causes confusion and breaks backward compatibility in environments where selection order has functional implications.

We suggest either:
- Persisting the selection order as defined by the user in the API.
- Or, at least, allowing the configuration of this behavior per field or structure.

This feature would improve consistency and data reliability for use cases where selection order matters.

Community
Company
Feedback