I try to retrieve the following fields: UID_TARGET
(From All subscribers), LAST_VISIT_DATE
(From Data Extension), LAST_STATION_TYPE
(From Data Extension) in the URL after clicking on the button submit.
When I add the AMPScript code at the page level (text) display a error message.
and, when I use the code amp script at the button, it does not retrieve the data.
AMPScript Code :
%%[
var @last_visite_date, @UID, @last_station_type
SET @UID = [UID_TARGET]
SET @last_visite_date = Lookup("ENT.ACTIVITY_LOT_6","LAST_VISITE_DATE","UID_TARGET", @UID)
SET @last_station_type = Lookup("ENT.ACTIVITY_LOT_6","LAST_STATION_TYPE","UID_TARGET", @UID)
]%%
URL example:
href="http://www.exempledomaine.com/fr-BE?CustomerId=%%UID_TARGET%%&refuelDate=%%=v(@last_visite_date)=%%&stationId=%%=v(@last_station_type)=%%&source=mailing"