I was trying to update a data extension with suscriber data about interests, I recently added 2 new rows, as this is filled with records from a register form, I'm planning to send an email with a small description and a button with an CloudPage URL.
The landing page is contains a pre populated form with the data I already have. I just want to obtain the interest info for this I'm using select labels.
This is an URL example : https://cloud.mailgranplan.com/actualizar-intereses?qs=c432442b25e5d77d1373366298a3e29cdf36d30cd7b7b6a9f6563174bc418d845036de5070797a8533e3b5d520732d1edfb50363a173c28faf77cc012e38b4faa4278c5c55f2a5ef3bf9bfa46ccb878e08859f8e9ae1d82d
The AMPScript within the landing page is the following:
<!-- starts --> <script runat="server" language="ampscript"> var @emailAddress, @firstName, @lastName, @interes_1, @interes_2 set @success = true set @emailAddress = AttributeValue("Email") set @firstName = AttributeValue("Nombre") set @lastName = AttributeValue("Apellido") set @interes_1 = AttributeValue("Interes") set @interes_2 = AttributeValue("Interes_2") set @updatedDate = Now(1) if Empty(@interes_1) or Empty(@interes_2) then set @success = false else UpdateData("Formulario Web",1,"Email", @emailAddress, "Interes", @interes_1, "Interes_2",@interes_2, "Updated", @updatedDate) endif </script> <!-- end -->
Someone could help me to know if Im in the right way or what I'm doing wrong?
Thanks in advance