> For the complete documentation index, see [llms.txt](https://docs.toomuchmedia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-function-parameters/assign.md).

# assign

The assign parameter to many [NATS ](/additional-resources/common-terms.md#nats)functions lets you change output variable names. For example, the NATS template function, [nats\_decode](/nats-admin/skins-and-templates/further-reading/template-functions/nats_decode.md), creates the following variable by default:

* {$encoded}

Unfortunately, if you already have a Smarty variable named $encoded when you call nats\_encode, the new value overwrites the old value. We designed assign to solve this problem. Call nats\_encode with an argument to the assign parameter to have its output placed in the variable named by your argument.&#x20;

For example: the following code,

* {nats\_encode assign="my\_variable"}

Puts the output in,

* {$my\_variable}
