# How to reveal a password on a Perspective table cell hover

**URL:** <https://forum.inductiveautomation.com/t/how-to-reveal-a-password-on-a-perspective-table-cell-hover/27541>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 17, 2019, 9:47pm UTC](https://forum.inductiveautomation.com/t/how-to-reveal-a-password-on-a-perspective-table-cell-hover/27541 "2019-08-17T21:47:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 17, 2019, 9:47pm UTC](https://forum.inductiveautomation.com/t/how-to-reveal-a-password-on-a-perspective-table-cell-hover/27541/1 "2019-08-17T21:47:05Z")

</div>

I’m posting this for anyone who may have a similar task - or a special CSS requirement for a table cell or column.

I keep a database of Engineering passwords for authorised users. Rather than have all the passwords visible to anyone looking over my shoulder I wanted to only reveal them one at a time on hover. Here’s how I did it.

- Set the table data query binding to _Dataset_.
- Add a _Transform_ | _Script_ to the query binding. Here’s mine:

```auto
	ds = value
	colNames = ds.getColumnNames()
	d = []
	for i in range(ds.rowCount):
		rowDict = {}
		for col in colNames:
			if col == 'Password':
				rowDict[col] = {"value":ds.getValueAt(i, col), "style": {"classes": "secret"}}
			else:
				rowDict[col] = {"value":ds.getValueAt(i, col)}
		d.append(rowDict)
	return d

```

- Create a style, _secret_ in this case.
  - Set the Base Style text to 2 pt. (This will be illegible unless the page is highly zoomed. I tried using transparency but couldn’t get it to change on hover. Someone may have a better idea.)
  - Add _Element State_ | _Hover_ and set the text size to 12 pt (or whatever). Set colors if required.
  - Leave both background colors empty / undefined.

If you examine the results in the table binding you’ll see the style object has been added to the _Password_ column.

* * *

One question: I rather work with JSON but couldn’t figure out how to do this other than with a dataset. How could I have coded it for JSON?
