Client Script working correctly on the Backend but not on the front end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2025 07:29 AM
Hello Community, currently I am solving a bug.
There is a Client Script, when it runs, it populates the Machine Name which is assigned to the specific user.
When I enter the name in the field - 'Requested for', automatically all the assets assigned to the user populate in the 'Machine Name' field.
The Client Script works well in the backend, but when I try the same on the portal, it is giving a JavaScript error.
When I try it on the portal, All the assets in the instance get populated into the Machine name field.
Client Script-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2025 07:46 AM
eval won't work in portal.
If you want to set filter then it will work only in native/backend and not in portal.
In portal you have only 1 input and not 2 slush buckets, you can set values directly in portal
check my blog on how to handle that
Dynamically set list collector on change of variable
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader