Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Mandatory Questions on RITM Approval View

BRoss
Tera Contributor

Hello,

I am working a project where a request is submitted with the majority of questions on the form completed by requestor before they submit it. Once submitted, the request is reviewed for RITM approval (Approval-Group) and 2 additional questions appear on the RITM View for the Approver to answer.  The visibility of these 2 questions is working great via Catalog UI Policy, and the policy sets the 2 questions as "Mandatory" with red asterisks appearing. 

 

The problem is that when entering the RITM view as the Approver, they are able to "Approve" or "Reject" without answering the 2 questions. 

 

How can I make the questions mandatory for the Approver to answer and enforce it?

 

 

Thanks for any ideas to remedy.

 

BR

1 ACCEPTED SOLUTION

Sonam Tiwari
Tera Guru

Hi @BRoss ,

You can probably have an onSubmit client script which applies on requested items

SonamTiwari_0-1690568518687.png

You can check if user has the approver role then you can set the fields as mandatory

// Check if the two questions are unanswered
var question1 = g_form.getValue('<question1>');
var question2 = g_form.getValue('<question2_field>');
if (!question1 || !question2) {
alert('Please answer all the questions before you act on the request.');
return false;
}

View solution in original post

6 REPLIES 6

@Sonam Tiwari 

I have not implemented a data policy on this, yet.  I will test it in my instance to see if it is a potential solution.

 

BR

sravya vemula
Tera Contributor

You can apply a Business Rule for this.