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

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