4D Blog

Home Product ORDA – Better list box row selecting

ORDA – Better list box row selecting

May 11, 2020

Product
You’ve probably used the LISTBOX SELECT ROW command many times, looping through each entity in order to select the rows for an entity selection.  4D v18 R3 simplifies the process with the new LISTBOX SELECT ROWS command.

HDI: Examples to easily select rows in a list box

entity selection List box 

The new LISTBOX SELECT ROWS command accepts an entity selection as a parameter. Rows matching the entity selection can be selected with just a single line of code. They can also easily be added to or removed from the selected rows.
 

Example

The following code creates an entity selection of cash-paying clients and selects the rows for the entity selection in a list box:

C_OBJECT($selection)
$selection:=ds.Invoices.query("payment=:1";"Cash")
LISTBOX SELECT ROWS(*;"Invoices";$selection;lk replace selection)
 
Here’s the resulting list box:

Collection List box 

The new LISTBOX SELECT ROWS command uses the same, easy principle! Simply, pass a collection containing the objects references you want to select to the command.
 

Example

The following code uses the Form.payments collection and selects the rows for clients within a specified payment range:

Using the Form.payments collection:

[
 {name:Cash,min:100,max:500},
 {name:Cheque,min:200,max:1200},
 {name:Credit card,min:700,max:1500},
 {name:Gift card,min:800,max:900}
]

 

C_COLLECTION($collection)
$collection:=Form.payments.query("min <= :1 and max >= :1";250)
LISTBOX SELECT ROWS(*;"Payments";$collection;lk replace selection)

 

The resulting list box:

blank

Download the HDI above and check the doc center to learn more about this new command. 

Discuss

Tags Collections, Entity selection, Listbox, ORDA, Programming, v18 R3, v19

Latest related posts

  • December 3, 2025

    Give AI to a 30 years old 4D application

  • November 28, 2025

    ORDA – Handle an event-driven logic during database operations

  • November 27, 2025

    ORDA – Permissions – Restrict / allow web access to the resources in one click

Avatar
Marie-Sophie Landrieu-Yvert
- Product Owner - Marie-Sophie Landrieu-Yvert joined the 4D Product team as a Product Owner in 2017. In this role, she is responsible for writing user stories and translating them into functional specifications. She also ensures that the delivered feature implementation meets the customer's needs. Marie-Sophie graduated from the engineering school ESIGELEC and began her career as an engineer at IBM in 1995. She took part in various projects (maintenance and development projects) and worked as a COBOL developer. She then moved on to work as a UML designer and Java developer. More recently, her main responsibilities included analyzing and writing functional requirements, and coordinating business and development teams.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy