Getting Wrapped Conversion Error:The undefined value has no properties error in workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 02:50 AM
Hi All,
I am having a script in workflow as below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 07:03 AM
are you able to replicate this error in lower instance i.e. DEV and UAT?
If yes then it's an actual issue.
if not then it seems configuration or data issue.
Things to check
1) is the variable name correct? Name and Work_location
2) is the field u_management_level present on sys_user in production?
3) there is no need to GlideRecord as Name variable is already a reference one
4) the user you are having in Name variable has some value in it for the field u_management_level
try this once
answer = checkMngr();
function checkMngr() {
var managerlvl = current.variables.Name.u_management_level.getDisplayValue();
var location = current.variables.Work_location.toString();
var mgmtlvl = managerlvl.indexOf('L');
var locationNFC = location.indexOf('NFC');
if ((mgmtlvl >= 0 && locationNFC >= 0) || locationNFC < 0)
{
return 'yes';
}
return 'no';
}
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