- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 08:35 PM
Hi All,
Actually For one knowledge base we have some categories, so for that every category , we have approver, So whenever we submit article for this KB, before publish we need approval based on the category?
Please help to complete this
Thanks
Deepika
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 09:46 PM
Hi you dont need to modify OOB Script include. You can handle this in workflow.
In knowledge approval workflow before Approval user Activity. You can add a IF condition to check your knowledge base sys id which needs to go for category approval . If yes in the next activity you can add a approval user activity to push the approvers based on categories. If knowedge base is not matched. you can use existing flow to connect.
Refer attached screenshot for sample
If activity script:
answer = ifScript();
function ifScript() {
var kBase = current.kb_knowledge_base;
gs.info("KBASE"+kBase);
if (kBase == 'a7e8a78bff0221009b20ffffffffff17') { //KnowledgeBAse sysid
return 'yes';
}
return 'no';
}
Approval User Script:
answer = [];
if(current.kb_category == 'ed1c2552ff0131009b20ffffffffff65') // category name
answer.push('1c8c17a307010110f1cbf48f7c1ed089'); // usersysid
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2022 12:21 AM
use the below in Approver user activity
answer.push(current.fieldname);
Harish