In many cases we want our users to specify which registers of a list they want to see. There are many ways to do this, in this article we will explain one of them. It consists in doing an Entry Panel where the parameters can be specified and then it links to our list and shows only the items that fulfill a condition which contains with those parameters.
1. Lets do a really easy model. We will use the following transaction:
NOTE: We want to see the different users depending the value of the attribute SDTTRNLaListaType
This att is based on a Domain Enumerated with two possible values:
2. Lets do an Entry Panel which will have the variables for the user to put the values to filter the list.
File/New Object/ Work With Devices
We want to create a Detail/Edit section. So delete the list node (right-click/delete), and create a Detail also create only on Edit Mode
Lets add a Variable to the Entry Panel
Remember that the type of this variable should the Type Domain (same as SDTTRNLaListaType). We selected the Domain Type=Character(1)
Add that variable to the layout. (Right Click over the Pink table on the layout tab)
Finally we have to create an action that will invoke the list we want to see.
3. Now on our list we have to define that we are going to receive a parameter.
Just add the following rule the Rules tab of the List.
4. Now we have to create a Data Selector which will filter the list for us.
This Data Selector will receive a parameter (the variable with the value we want to filter by)
rihg-click on parameters/ Add Var Parameter
we have to set a condition
right-Click on Conditions/ addCondition
5. Lastly we have to tell GeneXus that our List is going to use the Data Selector we recently created.
To do so we have a parameter named Data Selector on the properties of the List Node.
We select the Data Selector we just Created
and on the property Data Selector Parameter we specify the variable we receive is the one he needs to filter by.
Let see how it works: