by dev | Apr 21, 2018 | Book
Variables Similar to other programming and scripting languages, AMPscript supports variables. In programming, variables provide a convenient method of setting a function or value once, then reusing that variable by referencing it within code. This is in much the same...
by dev | Apr 21, 2018 | Book
Naming Convention Variables are essentially ‘named containers’, where a user-defined name is applied to a defined entity, either a constant or function. Variable names are case-insensitive and can include characters or numbers, but not spaces or commas....
by dev | Apr 21, 2018 | Book
Declaring Variables Before a variable can be set, it must be declared. Variables are declared with the var keyword, followed by one or more comma-delimited variable names. For example, if you need to define a member’s first name, last name and membership expiry...
by dev | Apr 21, 2018 | Book
Setting Variables Once a variable is declared, it can be set. Variables are set using a syntax that comprises of four elements: the set keyword the variable name a single equals symbol (=) a personalization string, constant or AMPscript function (which can contain...
by dev | Apr 21, 2018 | Book
Scope Once a variable is set, its scope is set globally; that is, it can be referenced later in the code to display the output, or used in conditional expressions. However, variables can also be changed after they have been set. For example, a promotion end date is...
by dev | Apr 21, 2018 | Book
Introduction Digital marketing is changing. Again. The lines between digital marketing and Customer Relationship Management (CRM) is blurring because the need for highly personalized, relevant communication is greater than ever before. The unique needs and desires of...