Questions tagged [ampscript]

AMPscript is a proprietary scripting language for Salesforce Marketing Cloud products that you can embed within HTML emails, text emails, landing pages and SMS messages to control the content that is displayed to the individual consumer. It also provides functionality to track impressions and highlight which content areas get the most attention from the viewer.

Filter by
Sorted by
Tagged with
3
votes
1answer
4k views

Exacttarget data extension - How to retrieve all rows in AMPScript

I have a landing page that needs to display a list of all the records in a data extension in real time. In the past we have done this with a subset of the data using the LookupRows function. This ...
0
votes
1answer
2k views

Does AMPscript have nested if options?

Can I join multiple if's like this? IF NOT EMPTY (@customernumber) THEN SET SET IF @usmsopt == "False" AND @presmsopt =="True" THEN SET ELSEIF SET ELSEIF ...
2
votes
1answer
838 views

Email attachment using rest API

I have a requirement to attach pdf document with my emails. And the pdf document changes with each email according to the system configuration. Can you please help in understanding how can I ...
0
votes
2answers
2k views

Assigning Field value as empty- exacttarget AMP

m trying to UPDATE : IF @usmsopt == "False" THEN SET @smsoptoutdate = CURRENT DATE ELSE SET @smsoptoutdate = CLEAR THE DATE ENDIF with the following AMP: IF @usmsopt == "False" THEN SET @...
1
vote
1answer
2k views

How to pull into content from XML using AMPscript?

I have a data extension in ExactTarget where in one of the fields we have XML code from where I have to extract specific info to print it out in an email newsletter. E.g.: FirstName: James Last Name:...
1
vote
2answers
145 views

AMPscript to Order Content based on Scores within the database

I'm trying to write AMPscript that will arrange content in an email based on a user's score across a number of variables. The higher the score, the higher the positioning within the email. For ...
4
votes
0answers
525 views

Using Salesforce Landing page checkbox values to populate a SFDC field

I have an ExactTarget Landing Page form that is currently inserting a Lead into SFDC when submitted. The form has 3 checkbox options that (if possible) I'm trying to concatenate and insert into the '...
3
votes
1answer
871 views

How to make a space disappear from between the value and percent sign?

this is a quick one. In one of the emails we are about to send out there is a weid space appearing in between the value pulled in through AMPscript and the % sign. E.g. %%rate%%% Result: 7.99 % ...
4
votes
2answers
2k views

RaiseError - Will it stop email from sending

I have an email that is pulling in a content area. In that content area it doing a lookup on a data extension. The data extension should have data for that subscriber in it but in some rare cases (...
0
votes
1answer
2k views

Embed weather forecast in email

Short background: working for an international language school. I wish to set up an automation for people who have booked a course and the course is coming up soon (for ex next week). In that email I ...
4
votes
1answer
2k views

How can I make sure the exacttarget email I've built using ampscript only sends if there are new posts in my RSS feed?

I've created an email using ampscript that pulls in the latest blog posts from an RSS feed. I would like to automate the sending of this email on a daily basis. This blog may have days where there is ...
2
votes
1answer
120 views

Need to populate an email referencing the latest data in a data extension

I'd like to insert content based on a user's last entry within a Data Extension; that is, if a user looked at five products over five days, I want to use the most recent product to insert content. ...
0
votes
2answers
1k views

AMPScript for Dynamic Content

I want to start out by saying I am new to AMPScript though I have a lot of programming/scripting experience. I am trying to figure out a way to do the following.I have a customer who has multiple (...
4
votes
1answer
1k views

Exacttarget AMP data extension Querying for Not empty values

I would like to query the Data extension record - subscriber with phone field contains data and aswell phone field not containing data . VAR @Rows2, SET @Rows2 = LOOKUPROWS("dataextensionREcord","...
3
votes
4answers
4k views

Dynamic trackable links in ExactTarget email

I have an ExactTarget email in which part of the content is generated from XSL: set @content = TransformXML(@markup, GetPortfolioItem("my xsl")) The XSL creates links similar to this: <a href='%%...
2
votes
1answer
954 views

Can I nest Replace() AMPscript function?

I am trying to nest an AMPscript function - Replace(). This should take a value and replace it based on what you designate in the function. However, I have two values I need to replace. The "@" symbol ...
1
vote
1answer
525 views

Page Requested is Unavailable [closed]

We have several form pages built using AMPscript and html. These pages create forms to add or edit items within data extensions. Strangely as I've used and reused the existing forms as templates I ...
3
votes
3answers
3k views

Is there a way to refer to AMPscript variables dynamically?

I have a piece of AMPscript containing 99 problems server variables which I would like to loop through and print, one by one. They're named [AX_VAR_1] through [AX_VAR_99]. I don't want to list out ...
1
vote
1answer
448 views

AMPSCRIPT Triggering Send API in a Landing Page?

Without using a posting form by a user, is there a way to automate a landing page to self execute on a daily basis using AMPSCRIPT and landing pages? I can actually use Automation studio to do this, ...
3
votes
1answer
2k views

Output a SSJS variable with Ampscript for loop

I have a for loop in SSJS and I am trying to output it outside this scope using AMPSCRIPT. I know there is a way to output the value of a SSJS variable into AMPSCRIPT. My question is, how can output ...
2
votes
4answers
3k views

LookupRows in All Subscribers?

When visitors register for an event through our ET data extension we want to scan through the "All Subscribers" data to see if we already have information on them such as name, company name etc. I ...
2
votes
1answer
985 views

AMPscript Encrypt with PHP Decrypt?

I am trying to understand how AMPscript EncryptSymmetric or DecryptSymmetric might work with openssl or mcrypt in PHP. Essentially - is there a way to use AMPscript to encrypt, and PHP to decrypt? ...
0
votes
3answers
964 views

ClaimRow(): Is there a WHERE clause?

Can I use the ClaimRow() with where clause? Essentially, I want to include voucher codes from various campaigns in one DE. Thanks,
0
votes
1answer
192 views

How to retrieve Subscriber Profile Attributes from an Enterprise 2.0 account?

How to retrieve a profile attribute value of a subscriber from an Enterprise 2.0 account? I have the following, but this is only for Subscriber Properties. Thanks SET @retrieveRequest = ...
1
vote
1answer
224 views

Rows in Data Extension Not being deleted

I have TriggerSend that I call using the web api. in the Email there is AMPScript A section of that AMPScript is suppose to clear data from named Data Extensions. However, no rows are ever removed. ...
1
vote
1answer
90 views

View all posted data?

I'm looking for a development method to use AMPscript (or?) to view all data posted to an AMPscript form processor. I had done something similar a while back in PHP but don't have access to the system ...
-4
votes
2answers
1k views

Retreive set subject line

I am creating multiple emails based off the same template in ExactTarget. Some of the emails will have a different subject line. Is there any way to pull the subject line created during the initial ...
6
votes
2answers
8k views

How To Display Values from a Data Extension with AMPScript

OK. So I have read all of the documentation, and tried this on my own, but this is all still coming up Japanese to me. I need help writing the code I need to bring data in from an extension to create ...
0
votes
1answer
78 views

Need to force a “div” every “nth” record from an array

In creating a set of records to help us print registration badges I'm attempting to force the page displays to insert a page-break div every 6th. record. I'm sure there are numerous ways to do this ...
0
votes
1answer
347 views

I need a better understanding of the work flow for using a trigger

I am having a hard time understanding ExactTarget's API. Please, in the lamest terms, someone please explain to me the complete flow of using a trigger email. Here is the scenario: New customer ...
0
votes
1answer
363 views

Getting the correct data extension rows in AMPScript

Our subscriber row has many rows, two of which are SubscriberKey, and ModifiedDate I have a data extension that contains info about what the subscriber purchased it is a one to many relationship, ...
0
votes
1answer
635 views

Using a single form to update multiple records [closed]

In our ExactTarget application we've used AMPscript and HTML to create forms which edit the data extensions. So far the edits have been to a single record per transaction. (edit the form content, ...
1
vote
3answers
539 views

Can the AMPscript DatePart(D1, S1) isolate AM or PM?

I see here that S1 = The part of the date to retrieve. Valid values include year (Y), month (M), monthname, day (D), hour (H), and minute (MI). I don't see a script to isolate the part of the ...
0
votes
3answers
1k views

using variable for ampscript Claimrow function

I plan to use many data extensions for voucher code so I created a reference data extension and capture the data extension name from there SET @getde = Lookup ("v1-reference", "DE", "date_code", @...
2
votes
1answer
549 views

Show different content based on language using Ampscript code

I want to show in one content area different content based on language. If EN and SV show 6 logos, all the other languages show 2 logos. Bare in mind that on the top of the mailer I already make a ...
2
votes
1answer
501 views

Using personalisation strings in landing pages

I was just wondering is there anyway to populate personlisation strings in landing pages? I know that I can set variables and access these via @[variable_name], however I have a landing page, that ...
1
vote
0answers
665 views

Can you create a Case via ExactTarget integration?

We're able to create leads, contacts and tasks without any problems from ExactTarget Landing Pages using ampscript and the Salesforce integration. I've tried creating a Case using simple code like the ...
1
vote
1answer
2k views

How to recognize duplicate records and other criteria within a Data Extension

Currently the AMPscript based landing page features an indication that shows how many individuals are signed up for an event. This number is arrived at simply by ROWCOUNT to see how many fields in the ...
2
votes
3answers
2k views

Dynamic From Names Based On Email Content

What I have is multiple email templates that are associated with different organizations and artists in one ExactTarget account. I want to be able to set an AMPscript or SSJS variable that would be ...
0
votes
1answer
1k views

Get an HTML form's POST variables with AMPScript?

Does anyone know if it's possible to get the POST variables from a form, using ExactTarget's scripting language, AMPScript? I'm seeing how to get parameters via query strings, but seeing how I'm ...
2
votes
1answer
2k views

Lookup Function with Shared Data Extension

I have 3 sub accounts for one client (per clients request) all of which are for different websites. I am trying to create a SHARED data extension for all accounts. The 3 accounts have full permissions ...
1
vote
1answer
5k views

ExactTarget Date and Time guidelines in AMPscript

Want to address the fact that Kelly's answers below did get me to the point of resolving this date/time challenge within AMPscript and ExactTarget. There was considerable effort involved in mastering ...
1
vote
1answer
243 views

Suggested date & time pickers for ExactTarget Landing Pages using AMPscript?

We're trying to determine an easy and usable solution to allow our administrators to have a date & time selector (almost certainly jquery or javascript based) available for forms built in ...
-1
votes
1answer
225 views

Possible to create a login using AMPscript?

Is it possible to use AMPscript to create a password protected area within the ET app? If so, where are some resources we could use to build this?
1
vote
1answer
2k views

URLEncode challenge in ExactTarget AMPscript Landing Page

I'm trying to add specific project info into URL's in an AMPscript driven database system. In doing so I've tried using the URLEncode() function as described here. Trouble is that it doesn't appear ...
2
votes
1answer
2k views

View email online link not working properly

we're experiencing some odd issues with our standard %%view_email_url%% link. In some cases, most of them triggered sends, the view online link works perfect, but if we check it again after some time (...
1
vote
1answer
1k views

Placing Server Side JavaScript within AMPscript

Is there anyway to place Server Side JavaScript within AMPScript? For example i have a JavaScript function getLink() which returns a link and i want to place it within a AMPscript TreatAsContent ...
1
vote
2answers
6k views

In ExactTarget AMPscript, how can I include a variable with a link inside a string variable and have the link tracked?

This has been killing me all day today. I have an email that has two layers of variables in the AMPscript at the top. First, all of the links are put into variables, like this: Set @HomePage = ...
12
votes
3answers
4k views

How to use HTTPGet variable in URL (ExactTarget)?

Been trying to figure out a way to pass in the variable into a HTTPGet function for long time now. How to do it? Here's what I have so far, but it doesn't return anything. <p id="date" style="...
1
vote
3answers
622 views

Using AmpScript to populate the number of days in a month

I need to populate the last day of the month for the current month in the email. Here is what I have so far. I am getting errors. %%[ VAR @lastdaymonth SET @lastdaymonth = xtmonthnumeric]%% %%[ ...