When adding query elements to a query definition, several options are available to be assigned.
Any valid arithmetic expression such as:
# Formula Expression
CustomerAge + CustomerIdentifierId – 1245
InvoiceSubtotal * 2
# Conditional Expression
iif(CitizenStatus = 1, "Waiting", Iif(CitizenStatus = 2, "OK", Iif(CitizenStatus = 3, "Error", Iif(CitizenStatus = 4, "Pending", "Other"))))
arithmetic expression:
Any valid aggregatte expression such as:
Sum(CustomerId + CustomerId)
Sum(InvoiceTaxes+InvoiceNonTaxes)
Sum(CustomerId) + Sum(CustomerId)
Sum(InvoiceTotal)/Count(InvoiceId)
by:
defined by:
weighted by:
A valid filtering expression:
Sum(InvoiceTotal) where Year(InvoiceDate) = 2008
Sum(InvoiceTotal) where Year(InvoiceDate) < 2008 / Sum(InvTot) where Year(InvoiceDate) > 2007
Sum(InvoiceTotal) where Year(InvoiceDate) in (2010,2020)
Check the Filters section for more detail.
Check the usage of the For each clause.
The following list of available functions can be used:
# Simple
Month(InvDate)
Upper(CustomerName)
# Composed
Trim(Str(Year(InvoiceDate)))
This behavior is available since GeneXus 16 Upgrade 11.