I'm trying to add form input value and DE field value in a URL.

I have a cloud page where customer will enter mobile number. I want to add product name in the URL associated with that Mobile number in a DE.

@Mobile number and @ProductName

The URL format is as below:


I want to replace product name with value availalbe in a DE and xxxx with form input value which is mobile number.

I was able to add mobile numder using concat function, however i'm unable to add product name.

Set @FMobile  = RequestParameter("mobile")
set @pageurl = "https://xyz.abc.xx.zz/productname?mobile=xxxxx"
set @pageurl = Concat(@pageurl, "mobile=", @Fmobile)
  • 1
    You need to do a lookup to the DE to get the value – EazyE Apr 25 at 21:03

I would do a lookup where the mobile variable is stored, here is a snippet:

set @key = [{primary key in DE}]
set @FMobile  = Lookup("{DE_that_stores_value}","{Column_of_which_you_want 
returned}","{Column_you_want_to_lookup_against}", @key)
set @pageurl = "https://xyz.abc.xx.zz/productname"
set @pageurl = Concat(@pageurl, "?mobile=", @Fmobile)

If you are trying to look up the product based on the mobile number in the request parameter of a submitted form I would do the lookup on @ProductName with the key being the request parameter in your lookup @key = RequestParameter("mobile")

You can read more about the ampscript lookup function here: https://ampscript.guide/lookup/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.