@ben-duchy Was meant ot be starter code… Have you tried debugging it…? Maybe print out the rows…
If it’s a select there may be a different serialized representation such as a dictionary, list or something. I don’t recall which naturally changes the access methdology.
I believe you can do:
rows|selectattr("COLUMN_NAME_OF_SELECT.name", "equalto", "car")|length
Or, if that fails:
{% set rows = hubdb_table_rows("TABLE ID", "COLUMN_NAME=OPTION VALUE") %}
But, selectattr with a single query is preferred. If even that fails… Great! As I said print it out, debug, and work with the data structure provided. If there’s not a simple built in just iterate and build a counter. Whichever way… there’s certainly a way to get the count. Just figure out how to get there ![]()
There’s also a much cleaner way to write what you have written.