The community member successfully connected to their Baserow database and got the tick box and search filters working. They are now trying to adapt the filters to work with a new select list form, but are having trouble using it as a filter for their database. Another community member suggests setting the values to the internal IDs of the select list items in Baserow, and using the IDs in the binding expression. After some back-and-forth, the community member is able to get the select list filter working by making the value property match the Baserow IDs.
The community member then runs into a similar issue with a custom range slider they added to their form. They are able to get the slider value to show up in the system search, but need to find a way to map the slider values to the corresponding Baserow IDs in order to effectively filter the data. The community members discuss a ternary operator approach to mapping the slider values, but are open to other potential solutions.
Hi there, I successfully connected to my Baserow database and got the tick box and search filters working — it’s great!
Now I’m trying to adapt the filters to work with a new select list form, but I’m having some trouble using it as a filter for my database. I suspect I’m missing something simple???
If anyone could share some advice, I’d greatly appreciate it.
Start by setting the values to the internal ids of the select list items in baserow. You set use field names to false meaning everything needs to be an ID. You can find those in the API docs. Ids are on the left in one of the attachments
Thank you very much John for the help, I thought I had done that in baserow data url but maybe I am not really understanding what you mean. I used thoses ids.
Oh you did! The problem is you are saying "if Culot is present, filter by every value in the list". Instead, it needs to be "If Culot is present, filter by the currently selected item which is system.search.Colot". But you'd need to change the values in the select list so that it just passes that value right into your query
I hope this isn’t too much to ask, but I’ve run into something I couldn’t find any documentation for and was wondering if there’s a simple workaround. Its still the same kind of issue as previously...
I added custom HTML to my form to include a range-type input since it wasn’t available in WebStudio’s featured blocks. Is there a way to filter data based on the value selected on the embeded slider?
Found it ! thanks again john however I am in need of a custom type of range slider, with ticks , so I'd rather use my custom one, Do you think there a way to filter data based on its value ?
yes thats very cool thanks ! now I need to find a way to convert the values given by the slider into system search into baserowID in order to effectively filter (like previously)? It seems tricky with a range slider to put non linear values
I used the ternary operator to map the range input values (1 to 5) to their respective baserowid. And it works, but maybe there is a better way to do it ?