Topic: How do I concatenate two (or more) text fields on a table grid

eg I have two fields defined - first_name and last_name in a table

I would like to display the full name on the table grid in a single column as first_name [space] last_name eg "Fred Jones"

Re: How do I concatenate two (or more) text fields on a table grid

Hi,
The easiest way is to use a calculated field to concatenate the first and last names (see attached)
Derek.

Post's attachments

Attachment icon concatenate.zip 336.8 kb, 275 downloads since 2019-08-02 

Re: How do I concatenate two (or more) text fields on a table grid

Many thanks for the quick reply - worked a treat.

Re: How do I concatenate two (or more) text fields on a table grid

Hello Derek

Thank you for this help.
I'm working on a project (MVD 5.4)  to calculate the annual expenses that my car costs me (garages, gas, insurance ...) and I was
asking how to pull out from a table this display : DACIA Dokker.
Well, I just saved time !

Thanks
JB

Re: How do I concatenate two (or more) text fields on a table grid

Hi Jean,
Glad to be of help.
You can also do the same thing in a script - for example 
sqlexecute('select firstname||" "||lmiddlename||" "||lastname||" "||email from people where id ='  etc etc) which can avoid lots of 'selects' and then joining fields together.
Of course, if you use this to output to a tablegrid, you then need to loop through the tablegrid, so a calculated field is often simpler.
Derek.