# Use of HTML in datasets and tables

**URL:** <https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [October 13, 2023, 6:47am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427 "2023-10-13T06:47:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 6:47am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427/1 "2023-10-13T06:47:35Z")

</div>

Hello,

I have a dataset in my client tag and I also have the whole data set in a power table. it consist of strings that are longer than my label can show and I know that I can add in front of the label but as soon as my label changes because of a parameter and it grabs a different string out of my data set it is gone. Is there a way to add HTML in such a way that my whole table is using it for strings or that my label is always using HTML?

if I add it in the text property it will be this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0d72e8c7808d57352a0ad51c722a67ac6a3a2b78.png)

but as soon my parameter changes value it will become this because it is grabbing a different string out of my data type  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/24f4df9f76aecf7dfd12764af434dae181e94ea9.png)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [October 13, 2023, 7:15am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427/2 "2023-10-13T07:15:12Z")

</div>

I don't have a concrete example at my finger tips...

But looking at the docs: [Vision - Power Table Scripting Functions - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Vision+-+Power+Table+Scripting+Functions) you should be able to use the configureCell extension function of the power table.

Check which column you are in, and then add to the text and return it back to the table.

Another option would be to add this tag when you are getting the data, if the only place you are using it is in this PowerTable. If coming from SQL you should be able to add it in the query as well.

Something like this (Very Dirty and not tested in any shape or form)

```auto
def configureCell(self, value, textValue, selected, rowIndex, colIndex, colName, rowView, colView):
	if colIndex == 1: #Put the column index in here
		return {'text':'<HTML>{}'.format(textValue)}

```

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 7:26am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427/3 "2023-10-13T07:26:01Z")

</div>

it is coming from a csv file

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [October 13, 2023, 7:26am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427/4 "2023-10-13T07:26:56Z")

</div>

Ah... OK. Then try the configureCell method and see what you get.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 13, 2023, 7:27am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427/5 "2023-10-13T07:27:13Z")

</div>

The label is the problem, correct? It's not the data in the table?

How are you getting the value into the label?

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 7:32am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427/6 "2023-10-13T07:32:25Z")

</div>

Yes the label is deleting the html everytime there is a new string being passed to it  
my dataset is in a vision client tag and then I'm getting the string from it by using indirect tag with the following path:  
`[client]DigIn_textlist[{1},1]`  
the number between these {} brackets is the parameter that is passing the number so that it is grabbing a certain row.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [October 13, 2023, 7:44am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427/7 "2023-10-13T07:44:31Z")

</div>

OK so this isn't a table cell that you are trying to put in but a label?

If it is really a label add a custom property to the label and bind the tag to that. Then for the text of the label use a concat expression to put the before the custom property that you just added to the label.

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 8:10am UTC](https://forum.inductiveautomation.com/t/use-of-html-in-datasets-and-tables/80427/8 "2023-10-13T08:10:19Z")

</div>

> [@bschroeder](#):
>
> concat expression

this works!! thanks for your help
