Normal Topic Populating a dropdown box (Read 435 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Populating a dropdown box
Dec 18th, 2008 at 4:12pm
Print Post Print Post  
I have the following code which generates a list of Customer "Checkcodes" which are a concatenation of the company name, city, state, and customer code.  It's used by my users in the retrieve spec for a quick picklist to look up a customer's record.
Code
Select All
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)
	} 


I currently have this running On Retrieve Spec Open of the Checkcode element.  Works fine, but causes a noticeable delay before the retrieve spec fully opens for use (there are thousands of customer records).

In an effort to have it run only when necessary (specifically, just when my users wanted to use the checkcode element to supply them with the checkcode) I tried moving it to the On Element Entry area, but it failed to function.  Got a blank dropdown.  Any idea what I'm doing wrong?

Update:  If I put it in On Element Entry it works in Add or Update Mode, but not Retrieve.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Populating a dropdown box
Reply #1 - Dec 18th, 2008 at 11:58pm
Print Post Print Post  
Infinity wrote on Dec 18th, 2008 at 4:12pm:
Update:  If I put it in On Element Entry it works in Add or Update Mode, but not Retrieve.

Only command buttons run that event on the Retrieve Spec.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged