Menu

Filter drop down lists using a WHERE clause

+2 votes

Please introduce the ability to filter drop down lists using a WHERE clause.

My particular interest is to filter by a status column (so an inactive row does not appear in the list).
This would be particularly useful for users so they don't have to know the status of the items in the list.

For example: We have a list of users of applications and can assign permissions to features/modules using db front, great! Over time features or modules go out of use, but they're still valid rows in the table & have historical links.
I just don't want these now-defunct items in the list - they're clutter and can lead to invalid choices.

Thanks!

(I don't think this is covered by https://dbfront.com/qa/313/ability-to-create-custom-drop-down-lists-on-fields)

in Features (Done) by (770 points)
recategorized by

1 Answer

+2 votes
 
Best answer

As of version 1.0.14.0475, dbFront allows you to add a SQL where clause on lookups.

Lookup items that are filtered but used will be marked with the text "(deleted)". If the user selects another item and saves the record then filtered lookup item will no longer be available.

by (65.1k points)
selected by
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...