# Icon Replacing Int value in Table

**URL:** <https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067>\
**Category:** Ignition\
**Created:** [March 13, 2020, 2:53pm UTC](https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067 "2020-03-13T14:53:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![twstevic](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@twstevic](https://forum.inductiveautomation.com/u/twstevic)\
**Post date:** [March 13, 2020, 2:53pm UTC](https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067/1 "2020-03-13T14:53:53Z")

</div>

I have a Power Table that returns a set of Integers, Strings, and Datetime values. I would like to replace one of the values with an icon, based upon the value of an integer. The script runs because I also alternate the colors of the rows, and that works. I get no error messages.

Any thoughts?

This is the code I am using

```auto

 	if colName == "IG_Alarm_Icon":
		if value == 1:
			return {"iconPath" : "Builtin/icons/16/Red_Bell.png", "text" : ""}

```

---

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [March 13, 2020, 3:56pm UTC](https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067/2 "2020-03-13T15:56:03Z")

</div>

Without seeing your full script I would guess that your alternate row coloring script comes before the block that you posted and it’s causing the IG\_Alarm\_Icon column script to not be executed.

In your row coloring script you have a return statement right? The return statement ends the configueCell function so the rest of your script isn’t run.

See [this post](http://forum.inductiveautomation.com/t/power-table-row-and-cell-coloring/15864/9?u=jgjohnson) for a method of handling multiple cell configuration items.

---

<div class="post-metadata">

**Author:** ![twstevic](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@twstevic](https://forum.inductiveautomation.com/u/twstevic)\
**Post date:** [March 13, 2020, 4:00pm UTC](https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067/3 "2020-03-13T16:00:20Z")

</div>

JGJohnson, Yes, I do indeed have a return statement after the row coloring script. Thank you for the link.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 13, 2020, 3:55pm UTC](https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067/5 "2020-03-13T15:55:49Z")

</div>

Print statements.  
The most likely cause is that your clause isn’t being met. Print after both if statements to check whether they’re actually being met. Try printing the `value` to see if it’s actually what you expect.

---

<div class="post-metadata">

**Author:** ![twstevic](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@twstevic](https://forum.inductiveautomation.com/u/twstevic)\
**Post date:** [March 13, 2020, 4:03pm UTC](https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067/6 "2020-03-13T16:03:36Z")

</div>

I truly did not intend to post this question twice. I will try JGJohnson’s suggestion, and this if I still don’t get it to work.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [March 8, 2022, 7:09pm UTC](https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067/7 "2022-03-08T19:09:13Z")

</div>

Is there any way to change the image size when returning it for use in the table, or will it use the size of the icon?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 8, 2022, 7:27pm UTC](https://forum.inductiveautomation.com/t/icon-replacing-int-value-in-table/33067/8 "2022-03-08T19:27:17Z")

</div>

If you use the `iconPath` return key, it’s hardcoded to 24x24px. You’d have to implement your own renderer if you want different behavior.
