is it possible to use multiple g_scratchpads?

Yuki21
Tera Expert

Hi.

I want to control the state of fields on the screen according to the group to 
which the logged-in user belongs. I am using client scripts (onLoad) + business rules (g_scratchpad),
is it possible to use multiple g_scratchpads?
<Here are the requirements I want to achieve>
Users belonging to group A: Make field AAA read-only
Users belonging to group B: Make field BBB read-only

<Referenced site>
https://community.servicenow.com/community?id=community_question&sys_id=d6f7eae2db36ff40414eeeb5ca96...
1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

yes you can.

But you can merge the logic and store the flag in single scratchpad as well and use it

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

Harish KM
Kilo Patron
Kilo Patron

Yes we can have multiple g_scratchpad. in a business rule and check in client scripts. Refer below

https://servicenowgems.com/2016/10/10/understanding-scratchpad-g_scratchpad/

Regards
Harish

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

yes you can.

But you can merge the logic and store the flag in single scratchpad as well and use it

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

SumanthDosapati
Mega Sage
Mega Sage

Hi,

Yes. you can use multiple g_scratchpad.