0

how can i join two parameters inputing this two parameters in one field data extension?

For example, in my html form i have the input=firstname and other input=lastname With AMPscript i will update this records in one data extension that i have only the field "Full Name". Is there a way to do this?

Thanks in advanced.

SET @SubKey = RequestParameter("subkey")
SET @email = RequestParameter("E-mail")
SET @name = RequestParameter("firstname")
SET @lastname = RequestParameter("lastname")
IF NOT EMPTY(@article) THEN
UpsertData('DE_01',1,'SubKey',@SubKey,'E-mail',@email,'Full Name', ?)
ELSE
DeleteData('DE_01','SubKey',@subkey)
ENDIF

1 Answer 1

2

Yes, you will need to use th Concat function. I will also suggest using ProperCase when working with names, ensuring the correct capitalisation:

SET @SubKey = RequestParameter("subkey")
SET @email = RequestParameter("E-mail")
SET @name = RequestParameter("firstname")
SET @lastname = RequestParameter("lastname")
SET @fullname = ProperCase(Concat(@name, ' ',@lastname)
IF NOT EMPTY(@article) THEN
UpsertData('DE_01',1,'SubKey',@SubKey,'E-mail',@email,'Full Name', @fullname)
ELSE
DeleteData('DE_01','SubKey',@subkey)
ENDIF
]%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .