I have a view with multiple values. This view is called directly into a dropdown list in my ERP. I would like to know if is it possible to limit the values of this view according to another field in the ERP?
The page that opens the form with the fields calls 3 procedures : before_open, before_close, after_save
I can't find any information on that.
I already tried creating a using the clause Where to limite the values but it didn't work.
//My view
CREATE VIEW Values
AS
SELECT N_values = 1 , Value = 'Working'
UNION ALL
SELECT N_values = 2 , Value = 'Pause'
UNION ALL
SELECT N_values = 3 , Value = 'Home'
UNION ALL
SELECT N_values = 4 , Value = 'Vacations'
GO
//To limit the values i did this where ID like 1,5,6
IF(field = 'Not at work') SELECT field FROM view WHERE N_values IN(3,4)
I expect the output of the dropdown list to be only [N_values] 3 and 4, but i get the all list.