Perspective table Toggle switch Scripting

I am using toggle switch in the perspective table. I need to enable the toggle switch which I has shown below:
image
I have assigned a toggleValue to the column of the table and write this scripting in it.
image

But I can't able to enable the toggle switch. Anyone please help me with it.

Can you show all of the toggleValue script? What are you trying to toggle, the underlying table's data property for that column?

Or are you trying to write to a tag whenever the toggle gets turned on? Also, where are you putting that script that you have a screenshot of?

[Please post code as text so we can copy / paste, not snip]

1 Like

Yes, I am trying to write to a tag. I am writing the script to the table, on event of onEditCellCommit. I has assign a toggleValue in the column properties.

Script I have used:

VALUES = self.custom.toggleValue
if VALUES==1
self.custom.toggleValue = False
else:
self.custom.toggleValue = True

Please read Wiki - how to post code on this forum - #10 by jlandwerlen and fix the code formatting in the post above. (Use the pencil icon to edit.)

Note that neither pieces of code you have posted could work as you are missing the colon (:) at the end of the if statements.