jeannie322
Programmer
In the form, I only want the person creating, or approving or the managers to see their own data. So, I put a where clause on the datablock for security within the form. However, my problem is when I try to query on JUST ONE record it still brings me all the records in my set. Any ideas??? -- I am using forms5
WHERE
GLOBAL.USERID = mishap_trend.submitted_username) or
-- person submitting record
global.userid = mishap_trend.corrective_username) or
-- person approving record
GLOBAL.USERID = MISHAP_TREND.USER_NAME)
-- person creating record (i.e a secretary)
OR
(exists
(select mishap_no from csc.mishap_route
where mishap_trend.mishap_no = mishap_route.mishap_no and
route_to = :global.userid))
-- sends out email when routed to, & this will allow that
-- user to see that record if they are in the routing
OR
(EXISTS
(select role_isn from mics.MICS_USER_ROLE
where role_isn = 3272 and user_isn = :global.user_isn))
-- this is a role I have given to the managers
If you need any more info, let me know. I know it has to do with this where clause because I can take it off & it works. Thanks in advance!!!
WHERE
GLOBAL.USERID = mishap_trend.submitted_username) or
-- person submitting record
global.userid = mishap_trend.corrective_username) or
-- person approving record
GLOBAL.USERID = MISHAP_TREND.USER_NAME)
-- person creating record (i.e a secretary)
OR
(exists
(select mishap_no from csc.mishap_route
where mishap_trend.mishap_no = mishap_route.mishap_no and
route_to = :global.userid))
-- sends out email when routed to, & this will allow that
-- user to see that record if they are in the routing
OR
(EXISTS
(select role_isn from mics.MICS_USER_ROLE
where role_isn = 3272 and user_isn = :global.user_isn))
-- this is a role I have given to the managers
If you need any more info, let me know. I know it has to do with this where clause because I can take it off & it works. Thanks in advance!!!