# Limit Variable Scope within resource files

**URL:** <https://forum.robotframework.org/t/limit-variable-scope-within-resource-files/5219>\
**Category:** Robot Framework\
**Created:** [29 January 2023 20:37 UTC](https://forum.robotframework.org/t/limit-variable-scope-within-resource-files/5219 "2023-01-29T20:37:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhx](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rhx](https://forum.robotframework.org/u/rhx)\
**Post date:** [29 January 2023 20:37 UTC](https://forum.robotframework.org/t/limit-variable-scope-within-resource-files/5219/1 "2023-01-29T20:37:05Z")

</div>

Is there a possibility to limit the scope of variables defined within resource files variable section to the resource file itself? Or is there another option to achieve this? The variables shouldn’t be “visible” within a testcase or another resource file, if I include this resource file containing the variables.  
Thanks!

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [29 January 2023 21:12 UTC](https://forum.robotframework.org/t/limit-variable-scope-within-resource-files/5219/2 "2023-01-29T21:12:29Z")

</div>

This is not yet possible. Please submit an issue to github.

> **[Issues · robotframework/robotframework](https://github.com/robotframework/robotframework/issues)**
>
> Generic automation framework for acceptance testing and RPA - Issues · robotframework/robotframework

It is implemented to keywords, that are tagged with `robot:private` but not yet for variables.

See [Robot Framework User Guide](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#private-user-keywords)

---

<div class="post-metadata">

**Author:** ![rhx](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rhx](https://forum.robotframework.org/u/rhx)\
**Post date:** [29 January 2023 22:01 UTC](https://forum.robotframework.org/t/limit-variable-scope-within-resource-files/5219/3 "2023-01-29T22:01:53Z")

</div>

Thanks Rene! It’s [Limit Variable Scope within resource files · Issue #4624 · robotframework/robotframework · GitHub](https://github.com/robotframework/robotframework/issues/4624)
