I have a dropdown which displays some programs (active and inactive). I have a column (isActive) in the programs table in the database which either has a value N or Y.
Now I want to filter the dropdown to display only active programs. So, I will just do a sql select to get all programs which are active. Everything is fine up to here.
Now if a user tries to access his record and the program which this user selected (sometime earlier) is no longer active now, the dropdown will now show the first value.
What is a possible solution for this issue? How can I only show active programs in the dropdown without messing up with users record?