AMPscript is a scripting language that you can embed within HTML emails, text emails, landing pages, SMS messages, and push notifications from MobilePush
Questions tagged [ampscript]
122 questions
1
vote
1 answer
Post custom HANDLER URL reCAPTCHA
I am trying to implement reCAPTCHA validation via Marketing Cloud - cloud page.
I have used this guide to do that: https://ampscript.xyz/how-tos/how-to-implement-google-recaptcha-on-marketing-cloud-forms/
What I want to do is to create a post…

nadav_z
- 21
- 3
1
vote
2 answers
How to get an element through amp script by using DOM accessor
Trying to get the element through DOM accessor in amp-script
Tried to get element by classanme,id and queryselector but couldnot get element
var blogs = document.getElementById('home-blog-cards');
Expected…

swathi palaparthi
- 11
- 2
1
vote
1 answer
How to get the index of each specified character in a string?
Suppose I have the following variable:
set @var = 'firstName|lastName|age|gender'
If I call,
%%=v(IndexOf(@var, '|'))=%%
The output with be 10
How can I find the index of each '|' in the variable?

Mike K
- 7,621
- 14
- 60
- 120
1
vote
1 answer
AMPscript If not empty Marketing Cloud If else
How should I structure this AMPscript to display 1 value if empty and other if not?
%%[
/*Set Dynamic Image URL for Hours Field */
IF not empty (@Business_Hours__c ) THEN
SET @HoursImgURL = "URL1"
ELSE
SET @HoursImgURL =…

Aaron
- 11
- 1
- 3
1
vote
1 answer
Salesforce marketing cloud issue
I tried to re-connect Marketing cloud with salesforce and this doesn´t work. Error: There was an error communicating with Salesforce, verify your connected app is set up properly and try again.

Ajith
- 11
- 2
1
vote
0 answers
ExactTarget for loop with matching on subscriber data
I'm hoping someone can help me with an issue I am having. I am attempting to loop through a data extension, let's call it Inventory, and match back to subscriber data. The Inventory DE has a row called "InventoryId" with numeric fields, as well as a…

SteveK87
- 11
- 1
1
vote
1 answer
Error in ampscript syntax
Please help me figure out the problem in my ampscript.
So here it is:
%%[ Var @phone Set @phone = Lookup(“Support Phone Numbers”, “Phone”, “Locale”, "%%Opportunity:Account:Locale__c%%") ]%%
The result of the script is placed in email like…

Oleg Rogachov
- 11
- 1
- 2
1
vote
2 answers
Unable to display Json Response in input checkbox tag
I am trying to display Json Response in input checkbox tag on button click. But i am unable to do it.
Can anyone guide me how to do it.
Below is the code -