How to join firstname and lastname

I would like to have a database query that combines both names similar to

SELECT *, UserFirstname + ’ ’ + UserLastName AS UserFullName FROM users WHERE UserID = :security_identity

In other words, a bit of flexibility to create a query would be welcome.

Hi Ben,

We specifically choose not to implement expressions in DB queries. You should really use those only for pure data retrieval. Then on the client side you can do your data formatting on display as you wish for example with the App Connect Data Formatter.

Hi Ben,

In addition to George’s reply, here’s how to join multiple DB values, really easy with concatenate filter.:

Sitting here alone, indulging myself with perceived problems, I have figured out how to obtain what I was seeking to do. I was working on Send Mail To Name and wanted both names as in FirstName LastName. I did this by going into the corresponding API file and adding it there.

“toName”: “{{$_POST.toFirstName}} {{$_POST.toLastName}}”,

Thanks for the explanation

2 Likes

Wow Teodor, did not realise it was that easy. Very much appreciated.

That’s suitable for displaying dynamic data on the page or using the innerText option on the page.
In your case, the solution you came up with is just perfect.