KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Quick tip on consolidating ORDA to reduce the number or server calls
PRODUCT: 4D | VERSION: 18 | PLATFORM: Mac & Win
Published On: August 24, 2020

ORDA is very powerful and allows for some complex queries to be changed together, take for example the following code that performs a query followed by an ORDER By:

$invoices:=ds.invoices.query("Date >= :1";Current Date).orderBy("Date asc")

The code above makes two calls from the client to the server, the first call is the query to get the entity selection and the second call is the order by to sort the entity selection.

The code could be written to include both the query and order at the same time, which can reduce the number of calls made from the client to the server from two to one:
$invoices:=ds.invoices.query("Date >= :1 ORDER BY Date asc";Current Date)