# Mapping a tag output from 1000 input values

**URL:** <https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483>\
**Category:** Ignition\
**Created:** [May 7, 2021, 4:32pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483 "2021-05-07T16:32:48Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [June 2, 2021, 5:08pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/21 "2021-06-02T17:08:35Z")

</div>

If any of both methods are well implemented I think the load on the server is negligible, in fact hard to measure since them will be something near 0 or equivalent between.  
In this cases I personally use a derived tag and do something like this:

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

where you should write all the mapping into read expression using case or switch:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/0/f041591a6de462aa048e23817fb8eeeacffe659d.png)

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [June 2, 2021, 6:52pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/22 "2021-06-02T18:52:28Z")

</div>

Thanks very much  
Going to try that for my fault strings.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [June 2, 2021, 6:57pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/23 "2021-06-02T18:57:11Z")

</div>

No problem, You can map to string or anything you wish, Ex. if you want to map to ints just change the derived tag type to int.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [August 31, 2021, 12:30pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/24 "2021-08-31T12:30:22Z")

</div>

I need to connect the 1000 codes to 50 images.

Last time, I had bound the image source to a dropdown property, and map transformed 8 images from 8 codes.

Should I make a tag. Use a tag script to map the 1000 codes to one of the 50 locations with a 3 digit code.  
Then bind the image source to the tag with another map of 50 images to the 50 3 digit codes?

Or is there a way to only map once or map easier?

I have an excel sheet with the 1000 codes and their locations.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [August 31, 2021, 1:07pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/25 "2021-08-31T13:07:49Z")

</div>

This kind of looks like the things I do at work, but I’m not sure what you’re trying to do. It’s a bit confusing…  
Could you try to describe step by step what you’re trying to do ? input, output, constraints…

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [September 1, 2021, 5:35pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/26 "2021-09-01T17:35:55Z")

</div>

one tag depicts the error code, which is a number from 1-1000. 1000 indicates running fine.

There are 50 locations that errors can be located and I have an image for those.

I need to show the right image for each error.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [September 14, 2021, 2:04pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/27 "2021-09-14T14:04:35Z")

</div>

I am trying to edit a tag in the script section.

```auto
temp = system.tag.readBlocking(["[.]../../Equipment_State"])[0]
	
temp2=machine1.get_errorlocation(temp) 	
	
system.tag.writeBlocking(["[.]Machine1 Error Location"],[temp2])

```

I verified this code works:

```auto
temp = system.tag.readBlocking(["[.]../../Equipment_State"])[0]
system.tag.writeBlocking(["[.]Machine1 Error Location"],[temp])

```

Do I need a “return temp2”?  
I can verify this works in the binding section of an object on perspective

```auto
value=machine1.get_errorlocation(value) 
return value

```

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [September 14, 2021, 6:10pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/28 "2021-09-14T18:10:45Z")

</div>

.value strikes again

Pturmel helped me out in another thread

temp.value

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [December 6, 2021, 9:56pm UTC](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483/29 "2021-12-06T21:56:39Z")

</div>

What is the best way to streamline the number of static tables and dictionaries?

What about across projects?

Like I have a dictionary used from a tag script, a project library script, and soon I will have a static table of the faults so I can join other tables in SQL.  
What is the recommended consolidation?

[Previous page](https://forum.inductiveautomation.com/t/mapping-a-tag-output-from-1000-input-values/46483.md?page=1)
