GetValue

This function returns the value of the specified AMPscript variable.

Argument

GetValue(1)

Ordinal Type Required Description
1 String True AMPscript variable from which to return a value

Example

%%[

var @firstName

set @firstName = AttributeValue("firstName") /* value from attribute or DE column in send context */
set @firstName = "Leon" /* or a literal value */

]%%
<script runat="server">

Platform.Load("core","1.1.5");

var firstName = Variable.GetValue("@firstName");

Write("<br>firstName: " + firstName);

</script>

Output

firstName: Leon