Table of contents



Official Content

This article describes how GeneXus determines the tables to browse for information that will be loaded on a Panel object.

For each Layout (either for a Panel object, or Work With object node -List, Detail or Section-), you have a fixed part, and possibly one or more grids (not considering grids associated with Structured Data Types).

If there are attributes in certain places (described below) related to the Layout, the plain (or fixed) part will have a Base Table. Similarly, if there are attributes in certain places related to a grid, there will be a Base table for it. Each base table is determined independently of one another, and navigations are independent as well (it is similar to having a pair of parallel For Each commands).

The attributes involved in determining the fixed part base table are:

  • The attributes included in the fixed part of the Layout.
  • The attributes referenced in Order, Search, Advanced search, and Conditions.
  • The attributes used in some of the Events, outside the For Each commands. Which events? Refresh, and all events related to buttons or control events in the fixed part of the layout, and in the Application Bar.

The attributes involved in determining the grid base table are:

  • The attributes included in the grid.
  • The attributes referenced in Order, Search, Advanced search, and Conditions.
  • The attributes used in some of the Events, outside the For Each commands. Which events? Load, and all events related to buttons or control events inside the grid.

Example

Suppose you have the following relationship among database tables:

SD Base Tables - relationship diagram

Suppose you have created a Panel (named SDPanel1), where you want to display the Country received by parameter, and the Customers from that country. To this end, you have defined the following layout:

SD Base Tables - panel layout

Rules:

parm( in: CountryId);

Furthermore, when the country has signed trade agreements, you indicate it by setting image1 as visible. Similarly, if the customer being loaded onto the grid has over 1,000 dollars invoiced, you will want to indicate thisby setting image2 as visible.

You have also inserted three buttons: one in the Application Bar ("Add"), one on the form (ViewInfo), and the third one on the grid (Billing...). Each button will have a user event.

This is the corresponding Event tab:

SD Base Tables - event tab

Determining fixed part base table:

The attributes taken into account are:

  • From the layout: CountryName.
  • From conditions tab: none (assume no conditions are set).
  • From events: CountryId from 'ViewInfo', (note that there are no attibutes inside 'Add'), CountryAggrement from Refresh.

So, the form base table is Country. Since Panel is receiving the country identifier in the attribute (CountryId), an automatic filter by equal will be specified.

Determining grid base table:

The attributes taken into account are:

  • From the layout: CustomerName (grids attribute).
  • From conditions tab: none (assume no conditions are set).
  • From events: CustomerId from 'Billing...' and none from Load (because there are no attributes outside For Each).

So, the grid base table is Customer. And again, since Panel is receiving the country identifier in the attribute (CountryId), an automatic filter by equal will be specified.

Note that both navigations are independent, as if they corresponded to two parallel For Each commands.

See Also

Native Mobile Applications Events
Server-side Events in Native Mobile Applications
Event Triggering Order in Panels
Orders and Filters in Grids of Panels

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant