Web

Bitrix24 Smart Process Binding: Sort by Addition Order

Customize Bitrix24 smart process binding fields to display values in order of addition instead of ID sorting. Use REST API widgets, business processes, or sort indexes for smart processes bitrix24. Step-by-step solutions and workarounds.

1 answer 1 view

How to arrange values in fields of type ‘binding to smart process elements’ in the order of addition instead of sorted by ID? Currently, they are displayed sorted by ID, which is inconvenient, and no solutions have been found.

Bitrix24 binding fields for smart processes (смарт процессы, смарт процессы битрикс24) are rendered by the platform sorted by element ID by default, and there’s no built‑in toggle to switch them to “order of addition.” The reliable ways to get an order-by-addition view are to fetch and render the list yourself (REST API / embedded widget) or maintain a numeric sort index (via a business process) and use that index when showing choices. Both approaches require a small customization (app, webhook or BP automation) because the standard binding control doesn’t expose ordering settings.


Contents


Why Bitrix24 binding picks ID order (смарт процессы битрикс24)

The “binding to smart process elements” user field is a built‑in connector that lists elements from another smart process (list). Bitrix24 documentation describes binding fields and the allowed types but does not provide a UI control to change the dropdown ordering for those bound values (the helpdesk pages document bindings and field types but don’t show a sort-by option) — see the Bitrix24 Helpdesk on user fields for smart processes https://helpdesk.bitrix24.ru/open/22088566/.

Why ID? Very often the system-side query that populates the control either defaults to an ID sort or to the underlying database order; ID sorting is simple and stable, but it doesn’t equal human “order of addition” in many cases (imports, migrations or edits can change perceived ordering). The available docs and community write-ups show connections and binding behavior but no native “change sort order” toggle for the binding dropdown https://wersis.ru/bitrix24/smart-process-connections/.

So, short answer: there’s no documented UI setting to flip the binding dropdown to creation-order. You’ll need a small custom approach.


Short-term, low-code workarounds (смарт процессы)

If you need an immediate improvement without coding, try one of these, understanding each has limits:

  • Use search/typing inside the binding control. The control usually supports incremental search — type part of the new element name to find it fast. Works well for small lists.

  • Show related elements via the “connections” tab or a dedicated list view. That doesn’t change the binding dropdown order, but it gives you a place in the card where items are easier to scan; see the connections guide https://wersis.ru/bitrix24/smart-process-connections/.

  • Replace the binding with a manual enumerated dropdown (list field) that you populate and order the way you want. Con: duplicates data and requires maintenance or automation to stay in sync.

  • Use a naming convention (prefix with a date or incremental number) so humans can find newest items even in an ID-sorted list — useful as a stopgap, but it won’t change automated sort behavior.

Avoid risky tricks (recreating elements just to get different IDs, manual DB changes) — they’re fragile and may break relations.


Recommended: REST API + small widget to show values by addition

Best practical approach: build a small UI (embedded iframe or Marketplace app) that reads the smart‑process elements ordered by creation timestamp (or by a dedicated SORT field) and renders them in the order of addition; then let the user pick an item and set the binding programmatically.

Why this works

  • You control the query order (order by DATE_CREATE or by your custom sort field).
  • You can place the UI where users work (element card tab, right column or a custom control).
  • No change to core platform behavior — safe and maintainable.

High-level steps

  1. Register a lightweight app or use an incoming webhook / REST credentials on your Bitrix24 account. Grant rights to read the smart-process/list and to update elements.
  2. Identify the smart-process list identifier (IBLOCK / list ID) and the binding field code you want to populate.
  3. Query elements ordered by creation date (or by your custom sort field). Example (pseudo):
  • REST call: lists.element.get with parameter order[DATE_CREATE]=ASC (or DESC for newest-first).
  • Or: use BX24.callMethod(‘lists.element.get’, params, callback) inside a Bitrix app iframe.
  1. Render results as a clickable ordered list in your widget. Show date and any helpful metadata so users recognize recent items.
  2. When the user picks an item, call the update method (lists.element.update or equivalent) to set the binding field on the current element. Use the API to write the binding value (element ID).
  3. Embed the widget into the smart process card (placement/tab) so it feels native.

Minimal pseudo-code (structure only — adjust to your environment and REST client):

POST https://your-domain.bitrix24.ru/rest/<user>/<webhook>/lists.element.get
body: {
 IBLOCK_ID: <SMART_PROCESS_IBLOCK_ID>,
 order: { DATE_CREATE: 'DESC' },
 select: ['ID','NAME','DATE_CREATE']
}

Render list in UI in returned order.

On select -> POST lists.element.update:
body: {
 IBLOCK_ID: <TARGET_IBLOCK_ID>,
 ID: <CURRENT_ELEMENT_ID>,
 fields: { '<BINDING_FIELD_CODE>': [<SELECTED_ELEMENT_ID>] }
}

Notes and references:

  • Use DATE_CREATE (creation timestamp) to reflect “order of addition.” If you prefer manual control, sort by a custom integer sort field instead (see next section).
  • Embedding and the JS client API patterns are the common approach for Bitrix24 apps and widgets; the helpdesk describes fields and business-process interactions that you’ll use when updating values https://helpdesk.bitrix24.ru/open/21679186/.
  • The community guide on smart‑process connections gives context for UI placements and card customization https://wersis.ru/bitrix24/smart-process-connections/.

Pros: Flexible, user-friendly, shows true “added” order.
Cons: Requires a little development (app or webhook) and proper permission scopes.


Business-process alternative: maintain a sort index

If you prefer a no-external-code route, keep a numeric “SortIndex” property on the linked elements and set it at creation via a business process. Then use that index when you render lists (via custom view or API). Steps:

  1. Add a numeric property to the smart-process elements (e.g., SortIndex).
  2. Create a business process (BP) or automation that triggers when a new element is created and sets SortIndex = max(existing SortIndex) + 1. The BP action updates the element’s field; helpdesk docs show how to set fields from a BP https://helpdesk.bitrix24.ru/open/21679186/.
  3. Use the REST API or a custom view to list elements ordered by SortIndex when presenting choices to users.

This method gives deterministic ordering and avoids custom apps if you can live with a separate UI (BP+list view). However, the platform’s built-in binding control still typically shows its default order, so you’ll still need a custom list or widget to let users pick by SortIndex — unless you switch to a manual dropdown that you populate in SortIndex order.


Advanced: custom field type or Marketplace app (cloud vs OnPrem)

  • Cloud Bitrix24: you can’t add PHP modules, so the practical route is a Marketplace app or an iframe widget that uses REST and the JS API to render your ordered chooser.
  • OnPrem (self-hosted): you can develop a custom user field type in PHP that renders its values in any order server-side. That’s more invasive but gives full control.

If you have development resources and want a productized solution, build a small Marketplace app that provides the ordered selector and installs placement into smart-process cards.


Implementation checklist

  • Decide approach: REST widget (recommended) vs BP sort index (no external code) vs custom field (OnPrem only).
  • Get admin rights and create an app or webhook; request read/write scopes for lists/smart processes.
  • Find target smart-process IBLOCK_ID and binding field code.
  • If using REST: implement lists.element.get ordered by DATE_CREATE (or SORT), render UI, implement element update on selection.
  • If using BP: add SortIndex property; create BP to set/increment SortIndex on create.
  • Test in a sandbox account or with test elements. Backup data before large changes.
  • Train users on the new chooser or field behavior.

Sources

  1. https://helpdesk.bitrix24.ru/open/22088566/
  2. https://helpdesk.bitrix24.ru/open/21679186/
  3. https://helpdesk.bitrix24.ru/open/23709036/
  4. https://wersis.ru/bitrix24/smart-process-connections/
  5. https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=57&LESSON_ID=23580&LESSON_PATH=5442.5446.5035.7943.23580
  6. https://helpdesk.bitrix24.ru/open/18913880/

Conclusion

There’s no built‑in option to make the binding dropdown sort by “order of addition” in standard смарт процессы битрикс24; the practical, maintainable solutions are either: (1) present the choices yourself via a small REST/API widget (order by DATE_CREATE or your own SORT field) or (2) maintain a numeric SortIndex with a business process and use that for ordered displays. Pick the REST/widget route if you want the most user-friendly, exact “added order” chooser; pick the BP route if you must avoid external code.

Authors
Verified by moderation
Moderation
Bitrix24 Smart Process Binding: Sort by Addition Order