Query Builder Questions

Hi. I'm new to Retool and have a couple questions about the Query Builder component.

  • Small nit, but I think the description in the Docs is placeholder text.

  • When you select the enum choice "Status" and choose "In" or "Not In", the MultiSelect starts with an empty displayValue. Do I need to to clear that out each time or am I missing something?

  • I'm hoping to use Query Builder to progressively filter a Table, curious if this is something you've seen before. I want to start with a table displaying the results of an initial query. Query Builder could then be used to add whatever Rules and Groups, which would trigger both a refresh of the table with the new query results *and* update the Query Builder Field choices with a list of possible choices. For an enum, I would only want to show the options remaining (a select of the distinct values for a given field in the query.data?). I would also want to allow users to save their Query Builder Rules/Groups so they could come back later and not have to do it all again from the top.

  • Lastly, does this sound possible with the Query Builder or would it require a custom component? I would like to have different filter operators depending on the field's data type -- Enums only get Null/Not Null and In/Not In; Dates would get date ranges, Numbers would get ranges but not In/Not In, etc.

Thanks!

1 Like

+1 for being able to control which operators are available for which field. It would be awesome to be able to add a key to the field dictionaries for the QueryBuilder, containing an array of the operators to allow.