- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 08:56 AM
I have written the script for approval as follows
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 09:35 AM
are you sure you are comparing the correct variable value for "will_the_server_be_supported_by_sso_or_the_project_team"
Should it be Project or project ?
what's the variable type for "will_the_server_be_supported_by_sso_or_the_project_team"?
print the value and see and then compare properly
var ass = fd_data.trigger.request_item.assignment_group;
gs.info('project team' + fd_data._1__get_catalog_variables.will_the_server_be_supported_by_sso_or_the_project_team);
gs.info('support group' + fd_data._1__get_catalog_variables.server_support_group);
if(fd_data._1__get_catalog_variables.will_the_server_be_supported_by_sso_or_the_project_team == 'Project' && fd_data._1__get_catalog_variables.server_support_group=='ef645b011b75e5505c1f99ba234bcbe8')
{
return "ApprovesRejectsAnyG[392a0a76ebac6e1014e3f7e2dad0cdb1]";
}
else{
return "ApprovesRejectsAnyG[" + ass + "]";
}
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 11:25 AM
Hello @SHALIKAS
Can you print those catalog variables value which you are fetching and see ?
Also print the value of condition check and see if everything is working as expected. I am sure it's breaking there somewhere.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 09:35 AM
are you sure you are comparing the correct variable value for "will_the_server_be_supported_by_sso_or_the_project_team"
Should it be Project or project ?
what's the variable type for "will_the_server_be_supported_by_sso_or_the_project_team"?
print the value and see and then compare properly
var ass = fd_data.trigger.request_item.assignment_group;
gs.info('project team' + fd_data._1__get_catalog_variables.will_the_server_be_supported_by_sso_or_the_project_team);
gs.info('support group' + fd_data._1__get_catalog_variables.server_support_group);
if(fd_data._1__get_catalog_variables.will_the_server_be_supported_by_sso_or_the_project_team == 'Project' && fd_data._1__get_catalog_variables.server_support_group=='ef645b011b75e5505c1f99ba234bcbe8')
{
return "ApprovesRejectsAnyG[392a0a76ebac6e1014e3f7e2dad0cdb1]";
}
else{
return "ApprovesRejectsAnyG[" + ass + "]";
}
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 11:25 AM
Hello @SHALIKAS
Can you print those catalog variables value which you are fetching and see ?
Also print the value of condition check and see if everything is working as expected. I am sure it's breaking there somewhere.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY