FormatNumber

FormatNumber This function formats a string as a number. Format patterns follow the C# format types outlined in the official Microsoft documentation: Standard Numeric Format Strings Standard Date and Time Format Strings Some of these custom formats are supported:...

GetValue

GetValue This function returns the value of the specified Subscriber attribute or AMPscript variable. Argument GetValue(1) Ordinal Type Required Description 1 String True Subscriber attribute or AMPscript variable from which to return a value NOTE: The function is...

Writing Variable Values

Writing Variable Values If your syntax is fine and you are dealing with runtime errors, you can strip out all HTML in your email or web page leaving just your AMPscript. If that does not give you some direction, reduce your code to the least amount that works, then...

GUID

GUID This function returns a 36-character global unique identifier (GUID) string. Arguments GUID() This function does not accept any arguments. Example 1 GUID: %%=GUID()=%% Output...

SetValue

SetValue This function sets the value of an AMPscript variable inside a block. Arguments SetValue(1,2) Ordinal Type Required Description 1 String True AMPscript variable name 2 String True AMPscript variable value NOTE: Prefixing the variable name with an @ character...

Using a SSJS Try/Catch to Trap AMPscript Errors

Using a SSJS Try/Catch to Trap AMPscript Errors For those elusive AMPscript runtime errors, you can get some additional details of the error by trapping exceptions with a SSJS try/catch block. Username or Email Password Remember me Lost your password? Not a...