Hello @Community Alums / @Nageshwari P , just tagging you here as well so you don’t miss it this time 😅. And hey, if this helps, don’t forget to hit that Helpful and mark my solution as accepted toooooo 🙌

 

I had some time so I tried to implement the functionality myself since I already had the setup in my PDI from our earlier thread. While searching around, I saw multiple suggestions saying to create a "sys_popup" view to get around this issue. I tried that as well, but nothing really worked.

 

After digging more, I came across an official KB (last updated in 2024) where it’s clearly mentioned that this issue cannot be resolved with the "sys_popup" approach. The only possible resolution is through ACLs, but even that is currently out of scope for ServiceNow. Basically, no BR or client script works on the preview UI, and as per the KB, it’s also not possible right now to directly exclude a specific variable with ACLs.

 

So, the only way I can suggest to make this work (even with some customization) is:

  • Hide the variable on RITM & SCTASK using a UI policy, so it only shows when the value is being filled on the portal form.

  • Once submitted, map that value into a custom field (say New Password).

  • Then, apply an ACL on that field with an advanced script to check if the logged-in user belongs to the right group, and control visibility from there. No need for BRs or client scripts in that case.

Here’s the ACL script I tested and it works fine:

 

// Replace with your group sys_id
var targetGroupSysId = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx';

// Get GlideRecord for sys_user_grmember
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', gs.getUserID());
gr.addQuery('group', targetGroupSysId);
gr.query();

// Return true if user is in the group, else false
if (gr.next()) {
    answer = true; // user has access
} else {
    answer = false; // user denied
}

 

 

AniketChavan_0-1755875870923.png
Scenario when I was present inside the group:

AniketChavan_1-1755876051178.png

 

AniketChavan_2-1755876253501.png

 

 

Scenario when I was not present inside the group:

AniketChavan_3-1755876298762.png

 

AniketChavan_4-1755876337020.png

 

 

 

 

Hope this helps. I’ll drop the KB link here as well for reference.

 

Sharing some additional reference link for this limitation : LINK

🔹 Please mark Correct if this solves your query, and 👍 Helpful if you found the response valuable.

 

Best regards,
Aniket Chavan
🏆 ServiceNow MVP 2025 | 🌟 ServiceNow Rising Star 2024