Normal Topic Populating a Combo Box (Read 706 times)
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Populating a Combo Box
Feb 19th, 2008 at 11:20pm
Print Post Print Post  
Hello,
I have been reading other threads on this and was wondering how to Populating a Combo Box from a field on the same form?
I have a combo box only visible in the "On retrieve spec open" event that I would like to populate with the names in the LE as to search only those files or leave it blank and search them all.
Can someone point me in a direction on this?
Thank you
Flip
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Populating a Combo Box
Reply #1 - Feb 20th, 2008 at 12:51am
Print Post Print Post  
Check out PopulateListElement() and @XListValues().
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Populating a Combo Box
Reply #2 - Feb 20th, 2008 at 5:39am
Print Post Print Post  
Thank you Carl,
PopulateListElement() hard codes the choices, not what I desire. @xlistValues() pulls the data from the field as desired but I do not understand how to put the selection into the field for a search parameter. Also it pops up before entering the form which kind of freaked me out at first.
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Populating a Combo Box
Reply #3 - Feb 20th, 2008 at 1:05pm
Print Post Print Post  
You must have been using them separately. I should have indicated that you should use them together.

Try something like this:
Code
Select All
var vList as string

vList = @XListValues(@Fn, "MyForm!MySourceLE")
vList = @SortStringArray(vList, 0)	// 0 = ASCII sort, 1 = Number sort
vList = @UniqueStringArray(vList)	// Removes duplicates
PopulateListElement(MyTargetLE, vList) 

  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Populating a Combo Box
Reply #4 - Feb 20th, 2008 at 2:37pm
Print Post Print Post  
Thank you Carl,
Yes, I was using them separately. Its the single level mentality.
Thank you again for your time and assistance.
Flip
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged