- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-22-2022 06:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-22-2022 07:56 AM
Are the field names correct? can you check if the application has business owner mapped? if yes also verify if owner is active or not.
keep log and verigy the values
gs.info("business owner: "+current.variables.application.u_business_owner.toString());
answer =[];
answer.push(current.variables.application.u_business_owner.toString());
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-22-2022 06:19 AM
If you are using workflow editor and want to set the approver to the owner of the application (assuming the owner is on the same table as the application) you can just dot walk to the owner like this:
Check the "Advanced" checkbox on the approval and add this (just change the bolded section to match your form variable name and app owner field on the table):
answer = [];
answer.push(current.variables.application.owner);
This is IF you application record on your table contains the owner.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-22-2022 06:27 AM
not working parker thank you for respondging i am trying below scriot also but not triggerd
//var author = current.variable.application;
var Req = current.variables.application;
var techapr = current.variables.application.u_business_owner;
//gs.addInfoMessage(techapr);
//gs.addInfoMessage(Req);
techapr = current.variables.application.u_business_owner.getValue().split(',');
var len = techapr.length;
for (var i = 0; i < len; i++) {
if (techapr[i] == Req) {
answer = "false";
} else {
answer.push(techapr[i]);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-22-2022 06:33 AM
Hi Suresh,
Could the business owner have multiple owners?
If yes, please use the below script.
var Req = current.variables.request_for;
var techapr = current.variables.application.u_business_owner.toString().split(',');
var len = techapr.length;
for (var i = 0; i < len; i++) {
if (techapr[i] != Req)
{
answer.push(techapr[i]);
}
//Answer variable can't take true false value here.
} else {
answer.push(techapr[i]);
}
}
Regards,
Nayan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-22-2022 06:36 AM
no single owner