Filtering data table

What I’m trying to do:
Filter column with value. The column is based on the value from selected value of drop down.
What I’ve tried and what’s not working:
app_tables.table_name.search(self.Filter_Columns.selected_value=str(self.Filter_Value.selected_value))

Appreciate the help very much.

this is a formatted code snippet.

paste your code between ```


**Clone link:**
*share a copy of your app*

Hi - can I nudge you towards this link. You’ll find more people will help if you give a lot more information (such as more explicit sample code and even a clone link if possible) :

2 Likes

It is hard to understand your case from the details you provide but I am guessing that you want to allow users to select a value from the dropdown and only show rows that have the selected value for a particular column.

In that case, here is the code -

rows_to_display = app_tables.table_name.search(name_of_your_column = self.Filter_Columns.selected_value)

Thanks. I am trying to create a nested filter. where the first filter decides which column in the data table to filter and the second the value of the filter. I got this working except the last step where I want the selected value of the 1st dropdown to be recognized as a variable instead of a value when actually filtering the data table. the error line in my second image is where I got stuck on this. Appreciate the help.