I have an project that uses the security module and I’ve used it also to also restrict users certain records of common tables to all users. The problem is that one of the table has many records and apply ‘WHERE’ in the ‘SQL’ based on user restrictions to the table gets many time in ScriptCase (about 1 minute for results) because if you provide a ‘WHERE’ in ScriptCase, the search applies another ‘SELECT’ to the results of the ‘SQL’.
So to access many of this tables I use a ‘Search’ before show the ‘Grid’ and apply this restriction filter to the ‘Master’ table in a ‘Double select’, so there is no need to filter the ‘Detail’ table who has many records and takes long time to this. With this, the user can only select in the those ‘Master’ records who has rights and the results gets in less than one second.
My problem is the default behavior of ScriptCase to do not apply any filter if there is no selection. So if user simply click for search without any select, shows all records even those without rights. ?How can I apply a filter to the ‘SQL’ if there is no selection on this ‘Double select’ of the ‘Master’ table or simply disable the search until at least one is selected? If I want to show all (not all in the table, all that the user has rights) the user must simply move all in the ‘Double select’ that has restricted to his rights.
Thanks in advance