TableLegacy show/hide custom button dependency cycle error

Context: I want to add a custom column (button type) in each table rows based on each row column value; if it is true then it will show the custom button column else it won't. I am using table legacy with mapped data source

Issue encountered: In the custom column settings, the currentRow or currentSourceRow is not working. When I am using {{self}} in show column settings, it pops out the dependency cycle error (Refer picture 2) . However, the exact code is working at disabled field (Refer pic 3)

As you can see, it didn't hide the column if the value is false

Please help

Picture 1

Picture 2

Picture 3

Hi @Clarence_Chhoa_Hua_Sheng,

Thanks for reaching out!

The Show column logic applies the exact same logic to every row in the table, so currentRow isn't in scope. This field doesn't allow you to show or hide the button per row. Since it's a single boolean value that applies to every row - instead of a mapped value - self evaluates to the entire table widget

Maybe something like the below could help as a workaround? For each row, it creates a html button called "hi", or, it creates a disabled html button with no label.

I'd recommend using the newer table, if possible, as it supports this use case: