- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2021 05:12 AM
HI All,
I have a business rule capturing user logged in with some roles validation and captured in scratchpad value. and now I want to use that scratchpad in UI action - conditions section for displaying button on validation. How can I use g_scratchpad in UI action. Please guide
Thanks,
Lean S
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2021 05:52 AM
If you are doing role validation in your UI action, you don't need to use the scratchpad.
Example: Only logged in Users with itil can see the UI action
gs.hasRole('itil')
If for some reason you are doing something unique with your check, you can do the scratchpad
Business Rule Display Storing Scratchpad Value
g_scratchpad.users = ['62826bf03710200044e0bfc8bcbe5df1', 'a8f98bb0eb32010045e1a5115206fe3a'];
UI action Check
g_scratchpad.users.indexOf(gs.getUserID()) >-1
My Admin account could not see the UI Action, But when I impersonate one of the users listed in the scratchpad, I can see it.
If this was able to answer your question, please mark it as the Accepted Solution so the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2021 05:52 AM
If you are doing role validation in your UI action, you don't need to use the scratchpad.
Example: Only logged in Users with itil can see the UI action
gs.hasRole('itil')
If for some reason you are doing something unique with your check, you can do the scratchpad
Business Rule Display Storing Scratchpad Value
g_scratchpad.users = ['62826bf03710200044e0bfc8bcbe5df1', 'a8f98bb0eb32010045e1a5115206fe3a'];
UI action Check
g_scratchpad.users.indexOf(gs.getUserID()) >-1
My Admin account could not see the UI Action, But when I impersonate one of the users listed in the scratchpad, I can see it.
If this was able to answer your question, please mark it as the Accepted Solution so the question will appear as resolved for other users who may have a similar question in the future.