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
0
votes
1 answer
AmpScript Newbie wants to know
How do I write the ampScript code to this:
If the field energy_type is not empty then show the copy starting 'Until 30 March 2023...
Thanks in advance.

Andrew Soko
- 1
- 1
0
votes
0 answers
Lost functionality turning radio button square
The code below is for a landing page in Marketing Cloud. I have been able to turn the radio button square but when I do they are no longer clickable. Any help would be greatly appreciated.
My communication…
0
votes
1 answer
AMPscript IF Statement returning variable as empty
I am running into an issue in AMPscript where the following IF statement is returning my variable @shippingVendor as nothing when I call it. (Tracking Number is from data extension)
Assuming @trackingNumber = 23456
%%[
var @shippingVendor
IF…

Zhelin Wang
- 11
- 2
0
votes
1 answer
SFMC AMPscript Understanding Controlling Expression Evaluation unclear
The below expression is not making sense to me. I'm having a hard time understand why it will result in "free shipping". Can someone elaborate on the explanation?
%%[
var @statusTier, @amount, @freeShipping
set @statusTier = "Bronze"
set @amount =…

CINMYSTER
- 3
- 3
0
votes
0 answers
LookupRows in lists in marketing cloud
Is there any way we can make a lookup in a List in marketing cloud ?
I am working on login where i need data from different lists in SFMC, I can see every list has a uniue LIST ID + The external key. I am unable to find the way to make a lookup in a…
0
votes
1 answer
AMPscript, rendering literal variable values
I’m trying to pull in variable values from a SSJS continent block.
I’ve looped over a base name to create incremental variable names.
It is putting out the literal variable names in to the email as opposed to the values (in attached image). I’m…

Jason G
- 1
- 1
0
votes
0 answers
Capturing Campaign through Ampscript in email giving duplicate records
Our requirement is to capture campaign information during send time through Ampscript. ask is to capture data extension name, jobid and publication list for every campaign(unique DE-Jobid pair). I am able to populate DE with details, however we see…
0
votes
0 answers
Find/Replace AMPScript
Is there a method to Find/Replace using AMPScript? I want to use AMPScript to search through an email to find sections of copy and replace them with alternative copy. I have been using the REPLACE() function but I have been unable to use it in this…

Ronan
- 1
0
votes
0 answers
Can I use AMPScript in the Picklist Options available in Distributed Marketing Multivariate to choose between a list of sentence/code options
For example the variable name %%=(@variableName)=%% would be used to select other variable name %%=(@anotherVariableName)=%% from the Options in the Distributed Marketing Multivariate. This AmpScript "%%=(@anotherVariableName)=%%" would then trigger…

Ronan
- 1
0
votes
0 answers
Is there a function in ampscript or ssjs to order columns based on priority?
I have a DE with 4 boolean fields and associated subscribe date field for each of the boolean fields. Each of this field has a priority but it is not available in any DE.
I need to display a content block based on the priority and subscribe…

ScarletWings
- 1
- 2
0
votes
1 answer
Get window URL in AMP
I have been trying to use the window.location.search inside my custom javascript to get the page URL in AMP page but I am getting empty field.
Is there any way/function by which I can get the page URL?
0
votes
1 answer
Using AMPScript to extract text from a String after nth delimiter
I need to be able to extract from a string after nth delimiter.
In this case, the delimiter is an underscore.
The challenge is that the last delimiter could be in the 2nd, 3rd,4th or 5th position
Example:
LB_AB_BookingReminder_123-1-2-1S (3rd…

Kwame
- 3
- 2
0
votes
1 answer
Trying to link data and then using ampscript to display different content blocks
I'm trying to bring in data from another (shared) DE and then using IF statement to show a specific content block depending on the outcome. I have managed to get rid of the errors but no content block is showing. Where am I going wrong?
SET…

rozzo
- 3
- 1
0
votes
1 answer
how to fetch enitre column values in sfmc/email from data extension. Using ampscript
how to fetch enitre column values in sfmc/email from data extension. Using ampscript?
eg.
countries -> column name
Australia
Singapore
Malaysian
newZealand
africa

Ranger M
- 1
0
votes
0 answers
Concat dynamic value and static text on the FromEmail sender profile
Let's say I would like to setup the FromEmailAddress of the sender profile with both dynamic value and static text. The FromEmailAddress would contain two parts : the account name which is dynamic and a static text '@email-3Dagency.com'. Here is an…