# Access variables from a global module to a normal module

**URL:** <https://community.hubspot.com/t/access-variables-from-a-global-module-to-a-normal-module/103008>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [March 20, 2024, 3:20pm UTC](https://community.hubspot.com/t/access-variables-from-a-global-module-to-a-normal-module/103008 "2024-03-20T15:20:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MPirnay](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@MPirnay](https://community.hubspot.com/u/MPirnay)\
**Post date:** [March 20, 2024, 3:20pm UTC](https://community.hubspot.com/t/access-variables-from-a-global-module-to-a-normal-module/103008/1 "2024-03-20T15:20:07Z")

</div>

Hello,

I would like to access variables from a global module in others modules in my templates.

In this global modules, I’m getting value from a HubDB row like this:

`{% set formation_date_text = module.hubdbrow_field.columns.date_text %}`

In another module, I want to display this variable like this:

`{{ formation_date_text }}`

This in not working. What is the process to make this happening ?

Tx,

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [March 21, 2024, 10:58am UTC](https://community.hubspot.com/t/access-variables-from-a-global-module-to-a-normal-module/103008/2 "2024-03-21T10:58:41Z")

</div>

Hi @MPirnay

Currently, it is not possible to use the variable of a module in a different module.

Thanks!

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [March 21, 2024, 9:05pm UTC](https://community.hubspot.com/t/access-variables-from-a-global-module-to-a-normal-module/103008/3 "2024-03-21T21:05:51Z")

</div>

Hi @MPirnay,

you could create a module with all of your settings, and use [export\_to\_template\_context](https://developers.hubspot.com/docs/cms/building-blocks/modules/export-to-template-context). Implement the module in a template and you can access all the settings from within the module.

Tipp: Erin Wiggers talks about this in the lates [Developer-HUG](https://www.youtube.com/watch?v=dBJZetIHRJM)

hope that helps

best,

Anton
