---
schema_version: "1"
id: bfcf1dca699c513c15be08c1640bbdf5841da9155f7c98c3ff40c0ea67e338cc
title: GetValue
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_platformAMPscriptVariableGetValue.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformAMPscriptVariableGetValue.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4f81df7dee3a8fec89679b88512911d0de01aabced941594fc27c40149164d78
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# GetValue

## Overview

Returns the value from the specified AMPscript variable in the current script context

### Syntax

GetValue(1)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description                                       |
| ------- | ------ | ------------ | ------------------------------------------------- |
| **1**   | string | **Required** | AMPscript variable from which to return the value |

## Example

```
<script runat=server>
     var example = Platform.Variable.GetValue('@AMPscriptValue');
</script>
```
