[#21304] Fix sql errors in parameter filters

Fix sql errors when selecting certain parameter widgets.