This topic is locked
[SOLVED]

 Custom Display field

2/23/2010 6:41:00 AM
PHPRunner General questions
F
fpilot author

Hello!

On a look up wizard, where it says "Custom Display field", I want to display FirstName LastName and MiddleName. When I use FirstName+' '+MiddleName+' 'LastName it only displays 0 and am not sure what I am doing wrong here. Pls advise

Sergey Kornilov admin 2/23/2010

All depends and what database do you use. Concatenation syntax will be different for each database.
Besides that you missing a plus sign before LastName.

F
fpilot author 2/23/2010



All depends and what database do you use. Concatenation syntax will be different for each database.
Besides that you missing a plus sign before LastName.


Hi sergey, thx for yr reply, the plus sign actually is there in original field. I am using mysql and did try FirstName." ".LastName but doesn't work either.

Sergey Kornilov admin 2/23/2010
F
fpilot author 2/24/2010



In MySQL you need to use CONCAT() function:

http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_concat



Thx Sergey, on the same screen for look up wizard in where field, how do we say that the empid=$_SESSION[OwnerId], is this syntex correct.

Sergey Kornilov admin 2/24/2010

Read the manual, please.
Visual Editor->Lookup wizard->WHERE expression

F
fpilot author 2/26/2010



Read the manual, please.
Visual Editor->Lookup wizard->WHERE expression


Hi Seregey, I did as per the example and written in where clause with the following variations:
"user=".$_SESSION["OwnerID"]

"PersonIncharge =".$_SESSION["OwnerID"]
Following is the error:

SELECT AgendaItem FROM Agenda WHERE AgendaId = 1 and ( PersonIncharge = )