UI action use scratchpad

Lean S
Mega Expert

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

 

1 ACCEPTED SOLUTION

Tiffany Royer
Giga Guru

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
find_real_file.png

g_scratchpad.users = ['62826bf03710200044e0bfc8bcbe5df1', 'a8f98bb0eb32010045e1a5115206fe3a'];



UI action Check
find_real_file.png

 

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.

View solution in original post

5 REPLIES 5

Tiffany Royer
Giga Guru

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
find_real_file.png

g_scratchpad.users = ['62826bf03710200044e0bfc8bcbe5df1', 'a8f98bb0eb32010045e1a5115206fe3a'];



UI action Check
find_real_file.png

 

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.