As far as I can tell the Extension Function configureEditor does not refresh. i.e. it only runs the first time the table opens. This means you can’t adjust a drop down list dynamically. Let me give you an example:
[code] import system
if colName == ‘Operator’:
creating a list of users that have are already showing up in this column
usedusers = []
for x in range(self.Count): #Count is a custom property (number of rows)
usedusers.append(self.data.getValueAt(x,colName))
creating a list of tuples for the dropdown
list = [('Fill me in','Fill me in')] #default value
users = system.user.getUsers("default")
for user in users:
if ("Operator" in user.getRoles()) and (user.get(user.Username) not in usedusers):
list.append((user.get(user.Username),user.get(user.Username)))
return {'options': list}[/code]
The above code gives you a drop down list to fill in an “Operator” column. It determines available operators and also determines which operators have already been used in the column. Therefore, after using an operator to fill in row 1, that operator should no longer show up in the drop down list. Unfortunately, that operator still shows up and I think the only way to get that operator to no longer show up would be to close the window and re-open it. Not very dynamic! Anyone have an idea how to make the editor dynamically refresh?