Data Selectors in Data Providers

Official Content
This documentation is valid for:

A Data Selector can be used in a Data Provider group in exactly the same way as in a For Each command.

Some examples already seen in 'Data Selectors in For each Groups' show this.

If you have the following Data Selector:

DataSelectorExampleB

From a Data Provider you can return the list of customers having an invoice in a given range (for example, taken from parameters):

1) 'USING' clause

Clients
{
     Client USING InvoicesByDate( &FromDate, &ToDate )
     {
        Code = CustomerId
        Name = CustomerName
     }
}

When invoking a Data Selector through the "USING" clause in a group (same as a For each), the Data Selector doesn't have an associated navigation (it doesn't have a base table by itself). At specification time, the Data Selector definition is combined with the Group definition to determine the table that will be navigated, taking into account the attributes of both definitions. So, the base table associated with the 'Client' group will be INVOICE.

2) 'IN' operator in the Where clause

Clients
{
    Client
    where CustomerName IN InvoicesByDate( &FromDate, &ToDate )
    {
       Code = CustomerId
       Name = CustomerName
    }
}

The Data Selector query will return a collection of values corresponding to the same definition as the attribute which precedes the IN operator. In the above example, the Data Selector returns 'a customer list' with invoices in the given range.

For further information, see Data Selectors in For Each command

See also

Data Selectors in Grids
Data Selectors in Aggregations
Data Selectors in Web Panels
Work With List Node
Entry Panels as Filters for a List in Smart Devices

Videos

Start Video Data Selectors