Table of contents



Official Content

Stores a set of Parameters, Conditions, Orders, and a Defined By clause in order to invoke it from different queries, calculations, etc. and reuse the same navigation several times.

Defining Data Selectors brings the following advantages:

  • Saving and reusing code: You define a Data Selector once and you can use that definition in several places in the Knowledge Base.
  • Less maintenance: You change a Data Selector definition in one place and it applies automatically everywhere it is used in the Knowledge Base.
  • They facilitate training in GeneXus: They provide code encapsulation and are easy to learn, define, and use.

Samples

Consider the following Transaction object:

Customer
{
   CustomerId*
   CustomerName 
   CustomerAddress
   CustomerStatus //One of the values that it stores is “Active”
}

Note it contains the CustomerStatus attribute. One of the possible values that it stores is “Active”.

Suppose that you need to query the "active customers" (CustomerStatus= “Active”) in many definitions in your KB. For example:

So, it is appropriate to define a Data Selector object with the filter condition and invoke it from the necessary places.

The following image shows a Data Selector named "ActiveCustomers" that defines the proposed filter:

DataSelector Example A V18

Once the Data Selector is defined, it can be invoked from:

Videos

Start Video Data Selectors

Subcribe to this category's changes
Sub CategoriesAdd a new subcategory in this category
PagesAdd a new page in this category
Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant