Ignition 8.1.1.
- I’ve got a table and a row Delete button.
- I need to get the “id” value of the selected row on the table.
- The Delete button onActionPerformed runs a script which contains the line
params = {'id':self.parent.parent.getChild("Table").props.selection.data[0].id}
system.perspective.print(params)
The console reports the row with
23: ... Perspective.Designer.Workspace - {'id': 1L}
23: ... Perspective.Designer.Workspace - {'id': 3L}
… the ‘L’ being added, I guess, to signify Long datatype.
If I change it to look at a cell that contains ‘ABC2’ I get
23: ... Perspective.Designer.Workspace - {'machine': u'ABC2'}
which looks like ‘u’ signifies Unicode.
How do I get just the data without the type information?
While we’re here, I can’t find a good tutorial on coding an Add and a Delete button for the table. It’s hard work! Is there a guide anywhere?
Many thanks.