- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 10:57 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 11:26 AM - edited 07-28-2023 11:26 AM
Hi @BRoss ,
You can probably have an onSubmit client script which applies on requested items
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 11:26 AM - edited 07-28-2023 11:26 AM
Hi @BRoss ,
You can probably have an onSubmit client script which applies on requested items
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 10:18 AM
Thank you for the suggestion, Sonam, I have tested this and it does not meet the requirements.
BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:41 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 10:25 AM
@BRoss ,
Can you check once if data policies can help you with the requirement?