I am trying to configure a button to use a for loop to go though each row of this table.
on each row the loop would grab the SheetID cell value and then use that as a parameter to run a query. (it has to be done in python).
Here is the issue i am running into and I desperately need help on. How do I reference a specific cell value in this table???
the loop is simple
R=0
While R< num rows
grab sheet ID value (I can not do this)<------------(this is where i need help)!!!
run query pass sheet id as parameter ( i can do this)
R +=1
All I need is to know how to reference a specific cell (When it is NOT selected). If you can help thank you!!
Past Tries: This is where i am coming from (I do not need help on anything below this, i am just giving you background of where i am stuck)
I have tried using Event configuration on a label to get the label to display the cell value
##table = event.source.parent.getComponent("Table")
##value = table.data.getValueAt(0, "SheetID")
##self.props.text = value
If I understand correctly, I think you should be able to do it in one query with something like this:
ids = data.getColumnAsList(data.getColumnIndex('SheetId'))
q = """
update your_table
set column = ~column
where SheetId in ({})
""".format(','.join("?" for _ in ids))
system.db.runPrepUpdate(q, ids)