Consultor Eletrônico



Kbase P18984: How to populate a COMBO-BOX widget with two database fields?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/04/2010
Status: Verified

GOAL:

How to populate a COMBO-BOX widget with two database table fields?

GOAL:

How to populate the CustomerCombo COMBO-BOX with the customer number and the customer name without customer name duplicates

FACT(s) (Environment):

Windows
Progress 9.x
OpenEdge 10.x

FIX:

The following code populates the CustomerCombo COMBO-BOX with the customer number and the customer name without customer name duplicates:

ASSIGN
CustomerCombo = ""
CustomerCombo:DELIMITER = CHR(1).
FOR EACH customer NO-LOCK BREAK BY Customer.Name:
IF LAST-OF(Customer.Name) THEN
CustomerCombo:ADD-LAST(STRING(CustNum) + " - " + Customer.Name).
END.