Normal Topic [Solved] Populating a combobox (Read 410 times)
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
[Solved] Populating a combobox
Dec 27th, 2007 at 5:45pm
Print Post Print Post  
Hallo!

I user the @XResultSetSearch and want to populate a Combobox but it does not happen!
Using a then @popupchoicelist i can select a value and place it in the combobox!

Thanks.


hier is my Code:

var vRSHandle as Int
var vTemp1 as String
var vTemp2 as String
var vLoop as Int
var vCount as Int

vTemp1 = ""

vRSHandle = @XResultSetSearch(@FN, "Varia", SEARCH_MODE_AND, SEARCH_SYNTAX_QA, "!Kode=.." + Kode +".." )
if(vRSHandle > -1)
{
XResultSetSort(Kode, "Kode:-1")
vRSHandle = @UniqueStringArray(vRSHandle)
vCount = @XResultSetTotal(vRSHandle)
For vLoop = 1 To vCount
XResultSetCurrentPosition(vRSHandle, vLoop)
vTemp1 = vTemp1 + @XResultSetValue(vRSHandle, "Kode")
If (vLoop < vCount) vTemp1 = vTemp1 + ";"
//@Newline()
Next

XResultSetClose(vRSHandle)
}

KodeBefund = vTemp1


//vTemp2 =  @PopupChoiceList(vTemp1, "Select A choice")
//KodeBefund = vTemp2

« Last Edit: Dec 27th, 2007 at 7:48pm by Hammer »  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Poupating a combobox using @XResultSetSearch..
Reply #1 - Dec 27th, 2007 at 6:21pm
Print Post Print Post  
Amor,

Setting a combo box to the assembled string changes the value of the combo box, not the list it offers. Try this:

Code
Select All
PopulateListElement(KodeBefund, vTemp1) 

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: Poupating a combobox using @XResultSetSearch..
Reply #2 - Dec 27th, 2007 at 7:23pm
Print Post Print Post  
Erika,
It works and i am very happy with it!

Thank you again.
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged