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

# 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"
```
