Form page:
%%[
set @travelinterest= RequestParameter("tli")
set @favouritebcdestination = RequestParameter("bcd")
set @email = "[email protected]"
UpdateData("B2CSubscribe_AN",1,"Email",@email,"Travelinterest",Replace(@travelinterest,",",";"),"Favouritebcdestination",Replace(@favouritebcdestination,",",";"))
]%%
Amp script :
%%[
VAR @email, @acts, @acts2, @acts3, @cnt_product
SET @rowset = LookupRows("DENAME","Email","[email protected]")
SET @row = Row(@rowset, 1)
set @email = "[email protected]"
set @act = Field(@row,"DENAME")
set @productrowset = BuildRowsetFromString(@act,";")
FOR @cnt_product = 1 to RowCount(@productrowset) Do
set @record_product = Field(Row(@productrowset,@cnt_product),1)
IF @record_product == "Arts" or @record_product == "Culture and Historical Experiences" THEN
SET @var1 = "Arts"
SET @var2 = "Culture and Historical Experiences"
SET @record_product = Concat(@var1, "," , @var2)
ENDIF
IF @record_product == "Aboriginal Culture and Experiences" THEN
SET @acts = "checked"
ELSEIF @record_product == "Arts,Culture and Historical Experiences" THEN
SET @acts1 = "checked"
ELSE
SET @acts12 = "checked"
ENDIF
Next @cnt_product
]%%
In form page the values are displayed in three checkbox like:
- Aboriginal Culture and Experiences
- Arts,Culture and Historical Experiences
- Driving Vacations
below that submit button will be there?
after clicking the checkbox the values are inserted in data extension in one field, each value is seperated by comma by default functionality, so i dont want comma, i am replacing the comma value using semicolon with the help of replace function, but in second checkbox arts after comma is there, while using replace function that comma also replacing, how to avoid that comma?please guide with code
I have tried with this:
set @p = "\s\,+\s\"
set @m = RegExMatch(@travelinterest,@p,0,"IgnoreCase")
set @o = replace(@travelinterest,@m," ;")
but it is not working,please anyone guide me ANSWER