OR better option:
Allow to set an ALLOWED CHOICES filter on a particular field where
1. Display ignores the filter and displays whatever value is currently set.
2. Choosing a new value filters out undesired choices (ie, discontinued items, inactive employees, etc.) based on a particular field in the db - ie, is_active !=1, active > 0, etc, etc.
Example:
Drop down combo box to assign employees to process an order. Old orders need to display from the full list as historical assignments should be preserved. New order assignments should have a drop down that only shows active employees.
- Code: Select all
Employee Active
Susan 1
Bob 0
Tom 1
ALLOWED CHOICES filter: Active = 1 (or Active != 0 or whatever you prefer)
This would be set in the VALUE LIST dialog for the dataprovider
- Code: Select all
Order AssignementDisplay Typeahead/Combo Choices (if clicked on)
1 Susan Susan,Tom
2 Bob Susan,Tom
3 Tom Susan,Tom
Current workaround - separate DISPLAY and CHOICE fields on the same form - both set to the same data provider, with different value lists. DISPLAY field uses the full list to preserve historical data, the CHOOSE field displays blank if tthe choice is not currently active, and when clicked on, only active choices are shown.
While this works, being able to set an ALLOWED CHOICES filter on value lists would be a much better solution.