---
schema_version: "1"
id: aee2eb1bdecd4cae77de4a89a054384c0a74c456ca95d1e61408305ebc494fa4
title: locationString
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-runtime-functions-locationstring.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-runtime-functions-locationstring
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 44c52feed3eea6136f0e0a02b30414ea895cab948b39f5d3397de20b17367b82
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# locationString

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## locationString(value: Any): String

Returns the location string of a given value.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>value</code></p></td><td><p>A value of any type.</p></td></tr></tbody></table>

### Example

This example returns the contents of the line (the location) that defines variable `a` in the header
of the DataWeave script.

#### Source

```DataWeave
%dw 2.0
import * from dw::Runtime
var a = 123
output application/json
---
locationString(a)
```

#### Output

```JSON
"var a = 123"
```
