# GetValueFromExternalMap

Fetches the value of a variable defined in a Job or Route.

When using a map in a Job, you can use the GetValueFromExternalMap function to retrieve the value of a globalMap variable.

When using a map in a Route, you can use the GetValueFromExternalMap function to retrieve a value saved in an external map. You need to create and save the external map in the execution properties with the identifier org.talend.transform.externalmap.

To use the Test Run feature with this function, you need create a CSV file in the Sample Data folder of the Hierarchical Mapper that contains sample key-value pairs. By default the name of the file should be org\_talend\_transform\_externalmap\_properties.csv. It can be modified in Window &gt; Preferences &gt; Mapping &gt; Test.

## Related example

* [Working with globalMap variables in a Job](https://help.qlik.com/talend/en-US/data-mapper-functions-reference-guide/8.0/working-with-globalmap-variables)
* [Working with an external map in a Route](https://help.qlik.com/talend/en-US/data-mapper-functions-reference-guide/8.0/working-with-external-map-in-route)

## Arguments

| Arguments | Definitions |
| --- | --- |
| Key | Specify the name of the variable to retrieve. |