g_scratchpad not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 05:48 AM - edited ‎11-28-2023 05:59 AM
Hi,
I have a simple requirement to show field message if user is SLT true. I have used Display BR to get the value from user table and called that in my client script. g_scratchpad is passing undefined value to CS (checked with alert). Not sure if i am making any syntax mistake or something else. Please find below both and let me know what i am doing wrong.
Display BR
Client script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 05:54 AM - edited ‎11-28-2023 05:54 AM
Hi @Sarabjeet1
The scratchpad variable in BR is g_scratchpad.slt but in client you have user g_scratchpad.vipslt
The names should match for it to work
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 05:57 AM
Hi Aman,
Thanks for your response. I corrected it and then also it is not working as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 05:58 AM - edited ‎11-28-2023 05:59 AM
Your Display BR is on user table and client script is on ritm, change the BR to run on RITM as well.
And in the script you will have to dot walk, like current.requested_for.u_vip_slt, something like this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 06:09 AM
Hi Anurag,
Thank you for pointing this. Now i changed the table to sc_req_item and used the below mentioned script. But still showfieldmessage() is not showing the required message.