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
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;
}

Thank you for the suggestion, Sonam, I have tested this and it does not meet the requirements.

 

BR

@Sonam Tiwari 

I have been able to get your suggested script to work as a solution. 

 

I have modified it to activate the prompt as a Catalog Client Script onLoad() of the RITM (Applies on Requested Items), so that the Approver will be notified that there are questions with mandatory response.   I appreciate the problem-solving guidance you have provided.

 

BR

Sonam Tiwari
Tera Guru

@BRoss ,

Can you check once if data policies can help you with the requirement?