SEL_LISTE
Description
This action is called at the very start of the template, before the display of the selection window.
Template
Selection from a list
Use
It principally serves to construct the selection window, from version 150, there is the possibility to construct 1 to 5 columns. In this case, it is necessary to re-declare the TEXTE variable to size it.
The following variables are loaded :
NBTEX : Integer
This is the number of lines ( therefore the number of possible values for the field that is entered) to be displayed in the window.
TEX(NBTEX) : Char, length 50, sized at 100
These are all the possible values for the field that can be entered.
TEXTE(NBTEX) : Char, length 50, sized at 100
This is the text is associated with each value. In fact, only these texts will be displayed in this selection list.
TIT : Char, length 50, sized at 5
It is the title of the window for the index 0, and the column titles for the indexes 1 to 5.
When there is no element to be displayed in this window, that is to say that NBTEX has been set to 0, there is possibility to display an error message by GERR=1 and by placing a text in GMESSAGE.
When there is no element to display in this window, that is to say that NBTEX has been set to 1, the template does not open the selection window, but automatically modifies the value of the field that is entered by this element.
To increase the sizing,which by default is set to 100, it is necessary to re-declare the variables TEX & TEXTE as local in this action.
Example
Selection window containing 3 columns.
$SEL_LISTE
Local File BPCUSTOMER [BPC]
Local File BPARTNER [BPR]
For [BPC]
Read [BPR]BPR0 = [F:BPC]BPCNUM
Local Char TEXTE(GLONDES)(1..200,1..3)
NBTEX = 20 : # Number of lines to be displayed
For I=1 To NBTEX
TEX(I) = [F:BPC]BPCNUM
TEXTE(I,1) = [F:BPC]BPCNUM
TEXTE(I,2) = mess([F:BPC]BPCTYP,401,1)
TEXTE(I,3) = [F:BPR]CRY
Next I
TIT(0) = "List" : # Title for the selection box
TIT(1) = "Customer code" : TIT(2) = "Type" : TIT(3) = "Country" : # Column titles
Next
Return