Here's my problem: In my Customer database have an drop-down element, Checkcode, which fills with a concatenation of the customer Name, City, State and Customer Code when any of these elements changes. The Checkcode element is used for a picklist used when searches and XLookups are done, and it fills the drop-down list On Retrieve Spec Open with this programming:
var vCheckcodeLookups as string
// Populates the Checkcode combo box
IF @MODE() = 2
THEN
{
vCheckcodeLookups = @XListValues(@FN, "Customer!Checkcode")
vCheckcodeLookups = @SortstringArray(vCheckcodeLookups,0)
vCheckcodeLookups = @Replace(vCheckcodeLookups, "&", "\&")
PopulateListElement(Checkcode, vCheckcodeLookups)
}
Groovy so far.
However, once the record is retrieved the pick list remains filled, and the user can select the element again, choose a different checkcode (representing a different customer record) and save the record, overwriting the correct checkcode for that record.
I have On Form Exit programming as follows:
// Populates the CheckCode
If not Checkcode=(@lt(COMPANY,15) + " " + @lt(CITY,10) + " " + STATE + " " + @STR(CODE))
then
{
Checkcode=(@lt(COMPANY,15) + " " + @lt(CITY,10) + " " + STATE + " " + @STR(CODE))
}
Theoretically, this should change the Checkcode back to the original when the user saves and exits. But it does not.
Any idea where I've missed the boat?