Setting table's columns according to the selected values of checkbox tree

Hey All, I'm trying to create a flexible table, which the user is able to choose its columns, by selecting a checkbox tree
the approach is creating a database query by selecting the value of this checkbox tree, which is located in "tree1.checked",
but I can't use this as a value inside the database query:
SELECT {{tree1.checked}} FROM users
SELECT {{tree1.checked.join(',')}} FROM users
or even using a state value
SELECT {{state1.value}} FROM users

any advice?

Hey @Mohammed, welcome to the community :hugs:

Interesting use case! I would use:

  • The dynamic column setting on the table
  • Link the dynamic column field with a select input that has all your headers
  • Trigger the addition/deletion of headers based on the checkbox

Makes sense?

1 Like

yes, it works, thanks a lot for the tip, have a wonderful day.

1 Like