shiller
Posts: 20
|
| Posted: 03/04/2008, 8:50 AM |
|
Experts,
Is there a way to concatenate two fields in a listbox in CodeCharge.... for example FirstName and LastName.
Thanks
|
 |
 |
ckroon
Posts: 869
|
| Posted: 03/04/2008, 9:31 AM |
|
I just figured this out the other day.
The method I sued was in Mysql.. so hopefully this applies to your situation.
Use this code in the data source of the listbox
SELECT forecast.forecast_id, concat_ws('-',forecast.forecast_date, period_defs.month_text) AS display WHERE forecast.initial_period = period_defs.period_id order by 2
Keep the following pieces intact:
concat_ws('-',
AS display WHERE
order by 2
Change the rest to suit your tables. The '-' is what separates the two fields in the display.
Enjoy!
_________________
Walter Kempees...you are dearly missed. |
 |
 |
shiller
Posts: 20
|
| Posted: 04/01/2008, 10:58 AM |
|
In the Listbox's "Text column" put: Expr1
In the Listbox's "Data Source Type" put: SQL
In the Listbox's "DataSource" put:
SELECT user_id, FirstName + ' ' + LastName AS Expr1
FROM users
the good folks at tech support suggest that methods and it works like a charm...
|
 |
 |
|