PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Filtering records in a TABLE
Filtering records in a TABLE
Débuté par Guillermo, 09 juin 2005 00:21 - 5 réponses
Posté le 09 juin 2005 - 00:21
Hi: I am testing WinDev 8 (trial version)
In a FORM where I manage the BANKS file, I placed a TABLE related with the branches of the banks.
In the TABLE are displayed all the branches and I am not able to filter the branches of the bank that I am showing.
that I am making bad?
Thanks..... Guillermo
Posté le 09 juin 2005 - 03:37
Guillermo
In the Row Selection code of the Banks table
Table_Branches..Filter = Banks.Bank_Code
Where Banks.Bank_Code is the field selected for the Search Item on the Content Tab of the table editor.
This assumes you have Bank_Code defined as the link in the analysis
The limitation here is that the records displayed in the Branches table cannot be sorted.
This can be overcome by using a composite key but then you will need to use HBuildKeyValue and HFilter to return the record set.
Regards
DerekT
Posté le 09 juin 2005 - 10:35
You have also to be careful you are filtering the key used for the table display for the ..filter to work.
You could use a Query on the HF file or HFilter as Derek says
Gill
Guillermo
In the Row Selection code of the Banks table
Table_Branches..Filter = Banks.Bank_Code
Where Banks.Bank_Code is the field selected for the Search Item on the Content Tab of the table editor.
This assumes you have Bank_Code defined as the link in the analysis
The limitation here is that the records displayed in the Branches table cannot be sorted.
This can be overcome by using a composite key but then you will need to use HBuildKeyValue and HFilter to return the record set.
Regards
DerekT
Posté le 09 juin 2005 - 16:48
Hi Derek & Gill

Surely for my poor English I expressed myself bad.
I don't have two tablas in the window.
In a window I handling the BANKS file (with entries and he followings buttons : add , delete, modify, next, previous, etc), in that same window I added the TABLE associated with the BRANCHES files which is the one that I want to filter and in DESCRIPTION-CONTENTS of the TABLE I don't know as coding the filter
Thank you again .... Guillermo
You have also to be careful you are filtering the key used for the table display for the ..filter to work.
You could use a Query on the HF file or HFilter as Derek says
Gill
Guillermo
In the Row Selection code of the Banks table
Table_Branches..Filter = Banks.Bank_Code
Where Banks.Bank_Code is the field selected for the Search Item on the Content Tab of the table editor.
This assumes you have Bank_Code defined as the link in the analysis
The limitation here is that the records displayed in the Branches table cannot be sorted.
This can be overcome by using a composite key but then you will need to use HBuildKeyValue and HFilter to return the record set.
Regards
DerekT
Posté le 09 juin 2005 - 21:15
In the field for the bank code
Banks.Bank_Code
whenever modified:
hfilter(mytablename,bankcodekey,myself)
then when ever the bank code field is changed the table will filter on that field.
Bert
Hi Derek & Gill

Surely for my poor English I expressed myself bad.
I don't have two tablas in the window.
In a window I handling the BANKS file (with entries and he followings buttons : add , delete, modify, next, previous, etc), in that same window I added the TABLE associated with the BRANCHES files which is the one that I want to filter and in DESCRIPTION-CONTENTS of the TABLE I don't know as coding the filter
Thank you again .... Guillermo
You have also to be careful you are filtering the key used for the table display for the ..filter to work.
You could use a Query on the HF file or HFilter as Derek says
Gill
Guillermo
In the Row Selection code of the Banks table
Table_Branches..Filter = Banks.Bank_Code
Where Banks.Bank_Code is the field selected for the Search Item on the Content Tab of the table editor.
This assumes you have Bank_Code defined as the link in the analysis
The limitation here is that the records displayed in the Branches table cannot be sorted.
This can be overcome by using a composite key but then you will need to use HBuildKeyValue and HFilter to return the record set.
Regards
DerekT
Posté le 10 juin 2005 - 01:45
Thanks Bert

In the field for the bank code
Banks.Bank_Code
whenever modified:
hfilter(mytablename,bankcodekey,myself)
then when ever the bank code field is changed the table will filter on that field.
Bert
Hi Derek & Gill

Surely for my poor English I expressed myself bad.
I don't have two tablas in the window.
In a window I handling the BANKS file (with entries and he followings buttons : add , delete, modify, next, previous, etc), in that same window I added the TABLE associated with the BRANCHES files which is the one that I want to filter and in DESCRIPTION-CONTENTS of the TABLE I don't know as coding the filter
Thank you again .... Guillermo
You have also to be careful you are filtering the key used for the table display for the ..filter to work.
You could use a Query on the HF file or HFilter as Derek says
Gill
Guillermo
In the Row Selection code of the Banks table
Table_Branches..Filter = Banks.Bank_Code
Where Banks.Bank_Code is the field selected for the Search Item on the Content Tab of the table editor.
This assumes you have Bank_Code defined as the link in the analysis
The limitation here is that the records displayed in the Branches table cannot be sorted.
This can be overcome by using a composite key but then you will need to use HBuildKeyValue and HFilter to return the record set.
Regards
DerekT