I have a field in my MS-SQL database Table which allows a Authorised USER to specifiy a record 'Marked for Deletion' (1 = marked, 0 = unmarked) and another field in the same record which only ADMIN can change which is 'Detail Listed' (0 = No, 1 = Yes).
The problem I have is that if a record is 'Marked for Deletion' by a USER then I don't want the record to appear at all in the List and View Pages (although of course it will remain in the database) BUT still be listed in the Edit page (in case a USER changes their mind).
Similarly if a record is marked by ADMIN as Detail Listed = 0 I still want the Fields NAME and PHONE to appear as Read Only in the List and View Pages but nowhere else (as the most likely cause is they haven't paid their account).
Is there a way I can use an SQL view to achieve this? Is there another way to do this?