9

As shown in the documentation (and more clearly stated in the AMPscript Guide), all math can only be done via the functions listed in the syntax guide [MULTIPLY(), SUBTRACT(), ADD(), etc.] unlike other languages that can use the operators of [-,+,*,/]. In contrast to many other scripting languages that use operators like +, -,*, and \, AMPscript uses a ...


6

Ampscript process from the top down so as long as the variable is defined in a content block above where you are referencing it, it will work.


4

You could assign the groups with a Query Activity. I validated this in my local SQL Server. SELECT CASE WHEN x.RowNum * 1.00 / x.Cnt <= 0.05 THEN 'A' WHEN x.RowNum * 1.00 / x.Cnt <= 0.15 THEN 'B' WHEN x.RowNum * 1.00 / x.Cnt <= 0.30 THEN 'C' WHEN x.RowNum * 1.00 / x.Cnt <= 0.55 THEN 'D' else 'E' ...


4

You would need to explicitly state the comparison again for proper syntax. So it would need to be: domain(Email) == "noemail.com" OR domain(Email) == "test.com"


4

You can use BuildRowSetFromString. It basically creates a rowset from a String using a delimiter. You should use something like: %%[ Set @queryparams = BuildRowsetFromString(@ColumnValue,',') for @i = 1 to Rowcount(@queryparams) do Set @row = Row(@queryparams, @i) Set @value = Field(@row,1) ]%% You can then use @value values in your UpdateData or ...


4

From a functionality point of view, this is definitely approachable. You will be extensively using the CloudpageURL function to pass parameters onto cloudpages. Step 1: (Passing values from email to Cloudpage1) @parameter1 can be a value in your sendable DE or subscriberkey or anything set within the email which will be passed into Cloudpage1. 123 is the ...


3

You can't perform this action on the client-side. Since you already have this data available, why don't you post your data back to your cloud page (or another page just for processing) and then parse it and insert the contacts into a DE? Here's a very general snippet that takes a csv from a cloudpage and passes it to another page for processing: CSV Upload ...


3

You can query the data extension and assign a GUID to each record. Also take into account EazyE's question on whether or not it already has a Primary Key. I'm assuming the GUID won't be the PK since it doesn't exist on records before your change. SELECT NewId() AS GUID FROM DataExtension


3

Try this code: %%[ VAR @today SET @today = SystemDateToLocalDate(Now(1)) ]%% %%=FormatDate(@today,"d MMMM yyyy à ", "HH'h'mm","fr-FR")=%% The FormatDate function takes up to 4 parameters. The parameter number 2 stands for the Date format pattern. The Parameter number 3 stands for your Time format pattern. I've just added a comma to separate the Date ...


3

Depends on your use case, but generally you have two options: Option 1: Use Journey Builder Sales & Service Cloud activities to create/update data on Salesforce CRM. You need to have the Marketing Cloud Connector. PS: don't forget to link your DE in Data Designer to be able to use it in your Journey. Option 2: Use a CloudPage to update data on ...


3

@Markus got you covered. Check out his answer to the same question: Accessing data from journey object/event in Emails using Journey Builder Hope that helps..


3

Here's what I use in SSJS. You'd need to use your own password, vector and salt, obviously. Encrypt function encryptString(decStr) { Variable.SetValue("decStr", decStr); </script> %%[ var @encStr set @encStr = "" if not empty(@decStr) then set @encStr = Base64Encode(EncryptSymmetric(@decStr,"aes", @...


3

These additional attributes will NOT be written/pushed to the IGO_PROFILES DE. Customer Attributes cannot be exported and currently do not get passed into Marketing Cloud data extensions. The primary use cases for these values are to seed Contact Attribute Affinity and to use these values in rules in influence recommendations. For example, a financial ...


3

If I understand correctly, you are basically looking to fill the @expires variable from a DE, instead of hard coded in the script. So, if this info is inside the sendable DE, you can do: SET @expires = AttributeValue('Expires') //Where 'Expires is the column name of your DE If its stored elsewhere, you will need to have a 'foreign key' (basically a ...


3

Yes. Here's a workaround to prevent the addition of WAC parameters using AMPscript: %%[ var @URL, @Link Set @URL = "http://www.salesforce.com" Set @Link = Concat('<a href=',v(@URL),' alias="Link">Link Test</a>') ]%% %%=v(@Link)=%%


2

You will need to call the Subscriber object using SOAP API. If you're doing this from a CloudPage, WSProxy will be the easiest solution: <script runat="server"> Platform.Load("core","1.1.1"); var subkey = "" //provide Sunscriber Key var email = "" //provide Email Address var prox = new Script.Util.WSProxy(); var sub = { SubscriberKey: ...


2

You'll have to use Javascript to pass the parameter to your iframe: var loc = window.location.toString(), params = loc.split('?')[1], iframe = document.getElementById('myIframe'); iframe.src = iframe.src + '?' + params;​​​​​​​​​​​​​​​​


2

There is no need to add parameters to your CloudPagesUrl function. It passes automatically information about the email and the subscriber in an encrypted string. Use this function in an email to pass information via a URL in an encrypted query string. For example, you could share a single unsubscription or profile center page for use in any sent ...


2

This error indicates that you are attempting to modify (or 'set') the counter variable. The counter variable is locked from modification within a process loop. Any attempt to declare it will result in a validation or runtime error. I'm assuming your loop looks something like: %%[ var @ModuleImageHTML_Counter set @ModuleImageHTML_Counter = 2 for @...


2

You have multiple options: Option 1: I understand that you have a lot of images, and the option 2 is not very suitable for your use case. You can use the "Predictable File URLs" fonctionnality on your account. You can enable it by going to Setup > Platform Tools > Content Builder > Content Builder Settings Since the image names are your users ids, each ...


2

OK, I found it. You have set a @SubKey, while in the function you used @skey. Try this: %%[ VAR @SubKey, @EmailAddress, @language SET @EmailAddress = emailaddr SET @SubKey = _subscriberkey SET @language = Lookup("Account_Salesforce","Language__pc","PersonContactId",@SubKey) ]%%


2

Through a bit of looping, you can probably get this fairly well automated. First I would create a delimited string with each of the product field names in it. E.g. 'productId1|productId2|productId3|productId4|productId5|productId6|productId7|productId8|productId9|productId10' and then use the BuildRowsetFromString function to turn it into a rowset you can ...


2

I think the issue was that you were appending the @cc variable before your conditional if statements, meaning that the @code you used in your lookup may not exist in the DE, causing it to return empty. Try rearranging it like this: %%[ var @CustomerID,@cc,@lang,@prefCountry,@code,@campaign,@preheader set @CustomerID = [SubscriberKey] set @lang = ...


1

You should use CreateSalesforceObject to create a task. Also you probably will need to lookup the user to create this task for, and will hence need RetrieveSalesforceObjects to get the ID


1

That sounds like an ampscript bug... it's possibly based on if they think the running user would do MM/DD or DD/MM but you're better of just formatting it differently. Your string ends up being DD/MM/YYYY while the string in the DateParse reference is YYYY/MM/DD. The easiest thing to do would just be to change SET @FirstOfMonth = DateParse(Concat('01/', @...


1

Depending on how your text dates are formatted, you many need to do some string manipulation before applying the formatting: %%[ var @orderDate var @convertDate set @orderDate = AttributeValue("ORDER_DATE") output(concat("<br>orderDate: ", @orderDate)) set @convertdate = FormatDate(replace(@orderDate," ",""),"l","","en-GB") output(...


1

Try wrapping each of your Ampscript in HTML comments. For example, replacing: %%[ your ampscript ]%% with <!-- %%[ your ampscript ]%% --> Generally this keeps it in place better. The SFMC WYSIWYG editor can do some strange stuff at times. It's not clear where you are doing the editing here, but in my experience using the 'free form' content block ...


1

If Firstname is an Subscriber Attribute I believe that you can write First_Name in the code but i would usually recommend a different way. You set the " at wrong places when you used concat. When you want to combine static strings it is always Concat("Text1","Text2") or Concat('Text1',"Text"). When using variables you would write it without " and use the ...


1

I am assuming that RowCount(@rows_EU_AMS) is coming back as 3. On that assumption, since you are running the for loop 3 times, just adjusting the iterative starting number - this is why you are getting more than 3 results. Look at it this way. Ending value (Rowcount) = 3. For loop 1: Start at 1 | End at 3 | Total runs: 3 For loop 2: Start at 2 | End at 3 ...


1

You will have to add the 0 option for the FIELD function. More info on the Field function. Indicates whether to return a NULL value or an error if the specified data extension field does not exist. Adding a 0 will return a NULL value if data extension field does not exist. Defaults to 1. set @productId1 = field(@row,"productId1", 0) /* note the 0 */ ...


Only top voted, non community-wiki answers of a minimum length are eligible