# Global and Local Variables

Global and local variables in Sherpa Designer differ in their scope.

The scope defines the context in which a variable is available for reading and writing:

* Local — available only in the current diagram.
* Global — available in all diagrams.

In the lower central panel, a dropdown menu allows you to select the mode:

* All variables are global — all variables will be available in all diagrams.
* Global and local variables — for using both global and local variables in different diagrams.

<figure><img src="https://3212714295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI0zUnKkOuy6lWt7DZ46u%2Fuploads%2Fgit-blob-48bd3e4c7919cf8d8f480fb6f4b871084779e80d%2Funknown.png?alt=media" alt=""><figcaption></figcaption></figure>

If you need to manually switch the variable's scope, you must check the checkbox in the left column of the "Variables" panel.

<figure><img src="https://3212714295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI0zUnKkOuy6lWt7DZ46u%2Fuploads%2Fgit-blob-df632c4648c4df5f37c2e9d8977980e33d8817ce%2Funknown%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

When checked, the variable's scope becomes global.

More about working with variables:

{% embed url="<https://docs.sherparpa.ru/sherpa-rpa/sherpa-designer/rabota-v-sherpa-designer/paneli-svoistv-i-peremennykh-i-rabota-s-nimi/panel-peremennye/rabota-s-peremennymi>" %}
