Tables

Hi all,

So I’ve got a table, and I want to use the first column for navigation. (It’s a weird application - but I want to do it anyway).

This is the code snippet I’m using:

row = event.source.selectedRow;
column = event.source.selectedColumn;
dataset = event.source.data;

target = dataset[row, 0];

if column == 0:
	system.nav.swapTo('Estimates/Service Item', {'ItemName' : target});

And this is the error:

Traceback (most recent call last):

  File "<event:mouseClicked>", line 5, in <module>

TypeError: 'com.inductiveautomation.ignition.common.BasicDataset' object is unsubscriptable

I assume I’m indexing the BasicDataset wrong. Anybody know exactly what I’m doing wrong here?

Thanks in advance,
Zac

Index the Dataset like this:

target = dataset.getValueAt(row,0)

Checkout the Dataset examples on this webpage: support.inductiveautomation.com … atatyp.htm
Best,