# Reference a Tag in a script

**URL:** <https://forum.vtscada.com/t/reference-a-tag-in-a-script/939>\
**Category:** General Discussions\
**Created:** [February 24, 2025, 1:17pm UTC](https://forum.vtscada.com/t/reference-a-tag-in-a-script/939 "2025-02-24T13:17:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkapacee](https://forum.vtscada.com/user_avatar/forum.vtscada.com/jkapacee/32/723_2.png) [@jkapacee](https://forum.vtscada.com/u/jkapacee)\
**Post date:** [February 24, 2025, 1:17pm UTC](https://forum.vtscada.com/t/reference-a-tag-in-a-script/939/1 "2025-02-24T13:17:32Z")

</div>

Good Day,

This is very basic but I cannot find any information on it.

How do I pass a Tag Value to a script parameter?

Or

Can someone provide the best way to learn VTSCADA script?

---

<div class="post-metadata">

**Author:** ![TomE](https://forum.vtscada.com/user_avatar/forum.vtscada.com/tome/32/754_2.png) [@TomE](https://forum.vtscada.com/u/TomE)\
**Post date:** [February 24, 2025, 3:37pm UTC](https://forum.vtscada.com/t/reference-a-tag-in-a-script/939/2 "2025-02-24T15:37:52Z")

</div>

The link below has a wealth of information… though what are you trying to achive?  
[https://www.vtscada.com/help/Content/Scripting/API/S\_Welcome.htm?tocpath=Scripting|\_\_\_\_\_0](https://www.vtscada.com/help/Content/Scripting/API/S_Welcome.htm?tocpath=Scripting%7C _____ 0)

You could reference a tag in script using scope or localscope - there are a few useful links below:  
[https://www.vtscada.com/help/Content/Scripting/Expressions/UseTagValues.htm](https://www.vtscada.com/help/Content/Scripting/Expressions/UseTagValues.htm)  
[https://www.vtscada.com/help/Content/Pro\_Functions/Scope.htm](https://www.vtscada.com/help/Content/Pro_Functions/Scope.htm)  
[https://www.vtscada.com/help/Content/Pro\_Functions/LocalScope.htm](https://www.vtscada.com/help/Content/Pro_Functions/LocalScope.htm)

something like this… just make sure your variables are set to the correct type.

```auto
Variable1 = Scope(\VTSDB, "TagName")\Value;

```
