# Universal symbol

**URL:** <https://forum.inductiveautomation.com/t/universal-symbol/43669>\
**Category:** Ignition\
**Tags:** ignition79, ignition80, ignition81, vision, scripting\
**Created:** [February 22, 2021, 9:02am UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669 "2021-02-22T09:02:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 9:02am UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/1 "2021-02-22T09:02:46Z")

</div>

Hi everyone! I am very grateful for the help I was given before! But I came to the dead end again. Can anyone tell me if there is a universal character like “\*” in “Expression” that can replace any meaning or word?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [February 22, 2021, 12:09pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/2 "2021-02-22T12:09:33Z")

</div>

The ‘like’ operator can use ‘%’ and ‘?’ wildcards.

[https://docs.inductiveautomation.com/display/DOC80/Expression+Overview+and+Syntax#ExpressionOverviewandSyntax-Operators](https://docs.inductiveautomation.com/display/DOC80/Expression+Overview+and+Syntax#ExpressionOverviewandSyntax-Operators)

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 12:22pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/4 "2021-02-22T12:22:47Z")

</div>

tag (like (%) + “/ HMI / Alarm / Jammed.value”) = true  
Where Like (%) should go through the entire tag base, and if at least 1 is true, then change the color.  
How i can write it?? or use

---

<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:** [February 22, 2021, 2:13pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/5 "2021-02-22T14:13:07Z")

</div>

> [@Andrii.Randiuk](#):
>
> tag (like (%) + “/ HMI / Alarm / Jammed.value”) = true

> [@Andrii.Randiuk](#):
>
> Where Like (%) should go through the entire tag base

I'm going to channel my inner @pturmel and say even if this works, it seems like an extraordinarily bad idea.

There has to be a better way. What exactly are you trying to accomplish?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [February 22, 2021, 2:38pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/6 "2021-02-22T14:38:59Z")

</div>

Well, safe to say, that an expression is not really what you need. You would need to script this.

```python
def browseTags(path, filter):
  
    # First, browse for anything that can have children (Folders and UDTs, generally)
    results = system.tag.browse(path)
    for branch in results.getResults():    
        if branch['hasChildren']:
            # If something has a child node, then call this function again so we can search deeper.
            # Include the filter, so newer instances of this call will have the same filter.
            browseTags(branch['fullPath'], filter)
 
     
    # Call this function again at the current path, but apply the filter.
    results = system.tag.browse(path, filter)
    for result in results.getResults():
         
        # Here's where you'd want to do something more useful. For now we print.
        print result['fullPath']
        tagList.append(result['fullPath'])
          
# Call the function. Replace the filter with your own search criteria.
tagList = []

browseTags('[default]', {'name':'*/HMI/Alarm/Jammed'})

tagValues = [tag.value for tag in system.tag.readBlocking(tagList)]

anyValue = any(tagValues)

system.tagWriteBlocking(['path/to/tag'],[anyValue]) 

```

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 2:39pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/7 "2021-02-22T14:39:56Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/7772e00faf6406ca8ae54f2e935a9c762e4719e0.png)  
Basically I want to create a indicator that will light up when {Root Container.Button for Footer 2.Area}={default/HMI/Alarm/Jammed.Area} && {default/HMI/Alarm/Jammed.value}  
I think that the best way to do so, it is as in my screenshot, but I don’t know how to replace highlighted bunch of symbols to %%(any symbols)  
maybe someone knows better way to solve this problem

---

<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:** [February 22, 2021, 2:42pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/8 "2021-02-22T14:42:33Z")

</div>

> [@Andrii.Randiuk](#):
>
> but I don’t know how to replace highlighted bunch of symbols to %%(any symbols)

You can't. Property and tag references via curly braces return _ **one** _ tag or property value. There's no syntax to return multiple. You would need to script a loop that searches through the tags. Exceedingly inefficient, too.

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 2:44pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/9 "2021-02-22T14:44:41Z")

</div>

which method can be effective?

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 2:45pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/10 "2021-02-22T14:45:42Z")

</div>

I should use your script in scripting my indicator?

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 2:50pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/11 "2021-02-22T14:50:22Z")

</div>

Where are you take def…( path…) because i see only def… (self…)?

---

<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:** [February 22, 2021, 2:51pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/12 "2021-02-22T14:51:11Z")

</div>

I would recommend creating an expression tag. In the expression tag, or the values of the tags you are interested in.

Then bind to that tag.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [February 22, 2021, 2:53pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/13 "2021-02-22T14:53:30Z")

</div>

I would run it in a gateway timer script.

Performance will get slower, the more tags you add to your gateway, though. Consider two separate scripts, one to browse and keep track of the tag names at a fairly slow rate, and one to read the values.

* * *

The suggestion of an expression tag is a good one, but may be more difficult to maintain if things get added or subtracted.

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 2:54pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/14 "2021-02-22T14:54:12Z")

</div>

I don’t want to write down all the tags I need, I want to automate it! But, alas, I don’t know how ((((

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 2:56pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/15 "2021-02-22T14:56:24Z")

</div>

if these tags are in the database, since they are alarms, it might be easier to get their value from there?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [February 22, 2021, 2:59pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/16 "2021-02-22T14:59:33Z")

</div>

If you’re doing at as an indicator, it would be better to get it from the tags.

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 3:01pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/17 "2021-02-22T15:01:54Z")

</div>

that is, will I have to write many tags in expression? and you can’t make it universal?

---

<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:** [February 22, 2021, 3:03pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/18 "2021-02-22T15:03:27Z")

</div>

> [@Andrii.Randiuk](#):
>
> I want to automate it!

I understand and approve of the sentiment, but you should only automate at _runtime_ if the list can _change_ at runtime. Tag browsing is slow and expensive--you should only do it to _set up_ a calculation, not every time you wish to _run_ it. I recommend caching a tag browse result in a project script top-level variable that you can reference from other code.

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 3:12pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/19 "2021-02-22T15:12:36Z")

</div>

I don’t know how I can do it, maybe you can tell me?

---

<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:** [February 22, 2021, 3:16pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/20 "2021-02-22T15:16:10Z")

</div>

> [@Andrii.Randiuk](#):
>
> maybe you can tell me?

Maybe. Does your list of tags change at runtime? And how many are there?

---

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [February 22, 2021, 3:21pm UTC](https://forum.inductiveautomation.com/t/universal-symbol/43669/21 "2021-02-22T15:21:08Z")

</div>

in the end, their number will not change

[Next page](https://forum.inductiveautomation.com/t/universal-symbol/43669.md?page=2)
