Hi All, Is there a way for me to run a saved searc...
# general
k
Hi All, Is there a way for me to run a saved search of the all the employee and their roles? I'm having trouble pulling their permission type for example Transaction ,Reports List,Setup, custom form.
d
At its simplest level, this is just an employee search with the Role as one of the result fields. Probably add criteria for Login Access = T and Inactive= F and you'll just get a list of every user with every role on a separate row. Not sure what else you mean by permission type.
☝️ 1
k
thank you. permission type like these on the follow screenshot
d
Gotcha. I have a Role Search that has criteria to limit to the roles I want and just this for results:
Then add a filter for the Permissions and you can see which roles have which level at each permission at a glance. Very useful.
k
I see, this is almost what i need but just need the type
For example "Find Transaction" permission's type "Transaction"
d
That's what the filter helps with:
So I open the search then just do CTRL+F and type "find transaction" among the permissions in the filter, then it filters to all roles with that permission and their level.
Could do multiple permissions if you want or add other filters, etc.
k
I see but that doesn't give me the types of the roles. ideally i need one more column on result . The following below is the result field i am trying to find
TYPE column is the categories each permission belongs to
Without doing the Decode portion (since I don't know how to yet), this is the result:
So that gets you 85% of the way there. 😉
Actually, looks like this formula does the trick perfectly! Adding it to my search as well. CASE WHEN {permission.id} LIKE '%CUSTRECORDENTRY%' THEN 'Custom Record' WHEN {permission.id} LIKE 'ADMI%' THEN 'Setup' WHEN {permission.id} LIKE 'LIST%' THEN 'List' WHEN {permission.id} LIKE 'REGT%' THEN 'List' WHEN {permission.id} LIKE 'REPO%' THEN 'Reports' WHEN {permission.id} LIKE 'TRAN%' THEN 'Transaction' WHEN {permission.id} LIKE 'GRAP%' THEN 'Reports' ELSE 'Custom Record' END
1
k
that is it. thank you Dylan!
d
FWIW the Decode version could be something like:
Copy code
DECODE(
  REGEXP_SUBSTR({permission.id}, '^\w{4}(_CUSTRECORDENTRY)?'),
  'ADMI',  'Setup',
  'LIST',  'List',
  'REGT',  'List',
  'REPO',  'Reports',
  'TRAN',  'Transaction',
  'GRAP',  'Reports',
  'Custom Record'
)
or more verbosely:
Copy code
CASE
  WHEN {permission.id} LIKE '%CUSTRECORDENTRY%' THEN 'Custom Record'
  ELSE DECODE(SUBSTR({permission.id}, 1, 4),
    'ADMI', 'Setup',
    'LIST', 'List',
    'REGT', 'List',
    'REPO', 'Reports',
    'TRAN', 'Transaction',
    'GRAP', 'Reports'
) END
d
Thank you, @David B!