
how do I get a multicolumn drop box selection to show in the combo inputbox
had the same problem: Populated a drop combo with 2 fields, and only the
contents of the first field is saved in the use var.
But then, the first field is only 10 characters long, and the total line is
50 chars long. Only the first 10 were displayed.
So I made my use var 50 characters long, and displayed the first field in
the list box formatter to 10 and the second to 40.
Now at the accepted embed, I retrieved the record and attached the name to
the code (Second field to first field).
LOC:MyUseVar = CLIP(FirstField) & ', '&CLIP(SecondField)
This way, the user sees what he/she selected.
But when I needed the first field (Primary key field) to look up something,
I cut it from the string:
a# = Instring(',',LOC:MyUseVar,1,1) ! Search for ','
NeededPiece = SUB(LOC:MyUseVar, 1, a# - 1) ! take left piece
No nice code, but it worked.
--
Ronald van Raaphorst
Compad
Windbrugstraat 15-21
7511 HR ENSCHEDE
Site: www.Compad.nl
Quote:
> This probably isn't the best way, I don't do too much database code, but
> you could prime the number field of the table and do a get() to get the
> correct record, then you could grab any values out of the record you
like...
> (lets assume the table is called Player)
> PLA:PlayerNum = The Number they picked !could also say
!player.PlayerNumber)
Quote:
> get(Player, NumberKey) ! get the relevant record
> ! can check for an error, but you shouldn't have an incorrect number
> ! if errorcode()
> !
> message('Error: '&Error())
> !
> do whatever handling you want to do
> ! end
> you now have the player you want, and you can get the name and any other
> details in the record.
> cheers,
> Sean
> > I am a newbee so please be gentle..
> > I am building a program where you select a player and player number from
a
> > drop list.. but when it is selected and the drop list dissapears I am
left
> > with only the player number in the input box
> > How do you tell it to display both the name and number
> > S.S