Portal screen UI action display conditions

bonsai
Mega Sage

When a record form is displayed on the portal screen, the UI actions used on the platform will be displayed.

 

On platform screens, we use "g_scratchpad" as a display condition for UI actions.

Button display control doesn't seem to be working on portal screens.

Is it not possible to use "g_scratchpad" as a display condition for UI actions on portal screens?

 

It works fine on the platform screen.

1 ACCEPTED SOLUTION

Nikhil Bajaj9
Giga Sage

Hi @bonsai ,

 

No, g_scratchpad is not directly available or intended for use within the Service Portal environment in ServiceNow. Instead, you should utilize the data object within the Service Portal's server and client scripts to pass information between them.

 

https://www.servicenow.com/community/developer-forum/is-g-scratchpad-available-in-service-portal/m-p...

 

https://www.servicenow.com/community/itsm-forum/g-scratchpad-is-not-working-in-service-portal/td-p/8...

 

if my answer helepd you, please mark it solution accepted.

 

Regards,

Nikhil Bajaj

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

View solution in original post

5 REPLIES 5

bonsai
Mega Sage

The display condition is the following value:

" g_scratchpad.field_name.indexOf("test")!=-1"

The value set for " g_scratchpad.field_name" is set in the display business rule.

Hi @bonsai,

 

g_scratchpad (display BR / server side) is not available at the service portal as it's front side...

 

I don't understand "On platform screens, we use "g_scratchpad" as a display condition for UI actions."

 

Can you please explain it? What was your goal with this? Let's find some alternative

 

 

EDIT: re-formatted the text

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Nikhil Bajaj9
Giga Sage

Hi @bonsai ,

 

No, g_scratchpad is not directly available or intended for use within the Service Portal environment in ServiceNow. Instead, you should utilize the data object within the Service Portal's server and client scripts to pass information between them.

 

https://www.servicenow.com/community/developer-forum/is-g-scratchpad-available-in-service-portal/m-p...

 

https://www.servicenow.com/community/itsm-forum/g-scratchpad-is-not-working-in-service-portal/td-p/8...

 

if my answer helepd you, please mark it solution accepted.

 

Regards,

Nikhil Bajaj

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

debendudas
Mega Sage

Hi @bonsai ,

Please note that g_scratchpatch will not work in service portal.

 

You have to clone the OOTB form widget and make changes to it for implementing this functionality.

 

If this solution helps you then, mark it as accepted solution ‌‌✔️ and give thumbs up 👍