# Memory Tags with Null value

**URL:** <https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [July 18, 2025, 1:09pm UTC](https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670 "2025-07-18T13:09:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gustavo.chamorro](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavo.chamorro](https://forum.inductiveautomation.com/u/gustavo.chamorro)\
**Post date:** [July 18, 2025, 1:09pm UTC](https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670/1 "2025-07-18T13:09:09Z")

</div>

Hi, everyone!

In the UDT definitions, I created a new data type and added several memory tags. As you can see in the image, I'm in the Tags tab and all my Memory Tags have the value “null” except for “TMPPL1” In it, I managed to put the script I wanted and it works perfectly.

All of them are string tags, all of them with null my script or another test don't work. Is there anything I can do to fix it?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/c/bc5c51cd71e338b8d84baa81c7471c560eb12ef9.png)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 18, 2025, 1:12pm UTC](https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670/2 "2025-07-18T13:12:23Z")

</div>

> [@gustavo.chamorro](#):
>
> all of them with null my script or another test don't work.

My guess is, the script. Hard to tell when we can't see it.

Also, only TMPPL1 and TMPPL2 have scripts configured.

---

<div class="post-metadata">

**Author:** ![gustavo.chamorro](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavo.chamorro](https://forum.inductiveautomation.com/u/gustavo.chamorro)\
**Post date:** [July 18, 2025, 1:22pm UTC](https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670/3 "2025-07-18T13:22:32Z")

</div>

Actually, only TMPPL1 is scripted. I'm reading a string that comes from my Mqtt and updates whenever I publish something, but that's beside the point.

My biggest issue is that these tags in null, with the same script or a different one, with binding or another test I've done, these tags don't work and, if I create a new one, it comes up with null.

Is there a limit to the number of tags I can have in a UDT?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/4/b47561e00223eff7ae911b26f0fd933f370531ae.png)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 18, 2025, 1:42pm UTC](https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670/4 "2025-07-18T13:42:29Z")

</div>

> [@gustavo.chamorro](#):
>
> Actually, only TMPPL1 is scripted

Your screen shots clearly show that TMPPL2 has an event script configured.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/2/f232ae4300739d0595fa9d1cc02a8537d8948e5a.png)

> [@gustavo.chamorro](#):
>
> My biggest issue is that these tags in null, with the same script or a different one, with binding or another test I've done

You're just not providing enough information for us to help.

What does "don't work" mean?  
What is the "different script"?  
What binding did you try?  
What was this "another test"?  
What does the UDT definition look like for one of the tags that "don't work"?

> [@gustavo.chamorro](#):
>
> Is there a limit to the number of tags I can have in a UDT?

No

Your script, which you claim works perfectly, has errors. If the value change is fired and the current value is equal to the present value, then you will try to use variables which have not been defined.

All you really need is this:

```python
if previousValue.value and previousValue.value != currentValue.value:
	values = [currentValue.value.split('; ')[0]]
	paths = ['[default]_Adamntina/BB/B1/SET_SUP_BB/TMPPL1']
	system.tag.writeAsync(paths, values)

```

---

<div class="post-metadata">

**Author:** ![gustavo.chamorro](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavo.chamorro](https://forum.inductiveautomation.com/u/gustavo.chamorro)\
**Post date:** [July 18, 2025, 2:12pm UTC](https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670/5 "2025-07-18T14:12:02Z")

</div>

Yes, but TMPPL2 had the script disabled so the icon remains anyway  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/7/37b41c6c44d10703bbf78869fa521ed1f3dbdbad.png)

I apologize, Louis, for my lack of description. In the next questions, I'll be more specific.

But I didn't say it worked perfectly, it's only working for my tests with mqtt at the moment, anyway I'll test the code you sent thank you very much!

But oddly enough in the UDT definitions in the value I pressed basckspace and another I tested leaving with a space. I updated and the null disappeared, I put my script and it worked!

 ![Captura de tela 2025-07-18 103921](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/4/846c527ca130dcd49cca2ec45641a957529a05f9.png)  
Thank you very much for your attention Louis!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 18, 2025, 2:15pm UTC](https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670/6 "2025-07-18T14:15:56Z")

</div>

Related topic:

> [@Null value in memory tag is read as empty string](https://forum.inductiveautomation.com/t/null-value-in-memory-tag-is-read-as-empty-string/108668):
>
> We have strange bug, where a nulled memory string tag sometimes is read in as empty string. We use a memory string tag to keep track of the operator working on a machine. After logout the tag is nulled. When an operator logs back in the tag is set again. The problem is, when reading from the tag, sometimes the nulled tag will be interpreted as empty string. Which is strange, because we also have a reference tag on that same memory tag and the reference tag is showing the null value? We checke…

---

<div class="post-metadata">

**Author:** ![gustavo.chamorro](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavo.chamorro](https://forum.inductiveautomation.com/u/gustavo.chamorro)\
**Post date:** [July 18, 2025, 2:19pm UTC](https://forum.inductiveautomation.com/t/memory-tags-with-null-value/108670/7 "2025-07-18T14:19:29Z")

</div>

Same problem, same day, good coincidence, Thanks
