# Creation of Instance Object

**URL:** <https://forum.inductiveautomation.com/t/creation-of-instance-object/72444>\
**Category:** Ignition\
**Created:** [April 14, 2023, 4:50am UTC](https://forum.inductiveautomation.com/t/creation-of-instance-object/72444 "2023-04-14T04:50:29Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [April 15, 2023, 2:46am UTC](https://forum.inductiveautomation.com/t/creation-of-instance-object/72444/6 "2023-04-15T02:46:36Z")

</div>

Thanks.

Here's another issue:

I get it working if I use a value change in a perspective view to trigger the project script.

But if I link the project script directly to a tag "value changed" script, it will show the following error:  
global name 'xxxx' is not defined

It's the same issue as mentioned in the two posts below.  
It looks like that I still cannot assign project script to a tag value change event.

> [@Gateway Script global name not defined](https://forum.inductiveautomation.com/t/gateway-script-global-name-not-defined/14819/4):
>
> Define functions in a project script module. Call those functions as project.someName.functionName(). In the designer, navigate to Project =\> Scripts =\> Script Library.

> [@Call project script from tag change](https://forum.inductiveautomation.com/t/call-project-script-from-tag-change/12086):
>
> Hi, I’m trying to create a simple logger for maintenance troubleshooting. Whenever I call from actionPerformed on a button or the scripting console everything works fine, but when I try to tie it to a tag change nothing wants to cooperate. Am I calling this right or missing a step somewhere? Any help would be greatly appreciated. My setup is Ignition 7.8.2, Java 1.8.0\_77, 2012 R2 with a win7 client Thanks Project Script (project.testLog): def opsLog(label,valueOld,valueNew): #Log sep. by …

---

_[View the full topic](https://forum.inductiveautomation.com/t/creation-of-instance-object/72444)._
