# PutValueToExternalMap

Creates a variable that can be reused in a Job or Route.

When using a map in a Job, you can use the PutValueToExternalMap function to define a globalMap variable that you can then use in other components.

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

Information noteNote: By default the variable created is a String. To create a variable in another data type, it needs to be explicitly defined. For example, you can define a variable as a BigInteger using the XPath function xs:integer(%v).

## 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 create. |
| Value | Specify the value of the variable. |