Need to make a field on Knowledge Article form mandatory, before the 'workflow' field is set to 'review'.

shawnclune
ServiceNow Employee
ServiceNow Employee

BACKGROUND:

A client wants to make a field on the Knowledge Article (KA) form mandatory before the article moves from a state of 'Draft' to a state of 'Review'.

Out-of-the-box (OOTB) ... a user can fill out the KA and leave the 'Article Body' field blank ... and click the UI Action to 'Publish' the KA and the article will move from a state of 'Draft' to a state of 'Review' with a BLANK (empty) Article Body field. 

This doesn't make sense - right?  Why would a 'Reviewer' want to review a 'blank' KA?

So the client wants to make the 'Article Body' field mandatory before the KA can move from a state of 'Draft' to a state of 'Review'

 

STEPS I've tried/taken:

I created a Business Rule as follows:

Field being used to key on:

find_real_file.png (Note I can select 'Workflow',  below in the condition, but not 'workflow_state')

 

When to Run:

find_real_file.png

 

Advanced:

find_real_file.png

 

RESULTS:

When I test this and I create a KA and leave the 'Article Body' field blank (empty) and then click the UI Action to Publish the article, I get the following (see below).

The KA is still being set to a Workflow state of 'REVIEW'.

find_real_file.png

 

 

Thoughts?

9 REPLIES 9

Allen Andreas
Administrator
Administrator

Hello,

I would recommend controlling this via a UI Policy, not in a business rule after the fact.

There are also other things going on with the workflow, etc. to where it may be changing the workflow stage depending on when that business rule is set to run. If it's a before business rule, less than 1000 order, then it runs before workflows even run. So the workflow could be overriding what you've done.

Please use UI Policy where that article body field is set mandatory without condition.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Allen,

I initially tried the UI Policy path (since so many posts recommended it), but that didn't work for me.  It would set the 'Article Body' field to mandatory, but still allow the 'Workflow' field to move from DRAFT to REVIEW.

I wish the UI Policy had the ability to perform an action like 'Changes to', but it doesn't.

I'm starting to think I might have to use a Client Script, but ... my initial concern there is whether or not the script can CATCH this before the 'Workflow' field is set to REVIEW too.

Hi,

 

Ah, yeah, I believe this is because the UI Action on the kb_knowledge table is not client side enabled, so it's bypassing client mandatory requirements (like a UI Policy).

You can edit the dictionary entry for the article body field then, if you so choose.

Right-click article body field label > configure > dictionary > set mandatory to true.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

m_murphy
ServiceNow Employee
ServiceNow Employee

As Allen recommended, this can be achieved using a UI Policy.