- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 11:19 AM
Hello,
I have 5 mandatory variables that only the tech should fill in once the auto-generated SCTASK is assigned to the group.
However, the SCTASK cannot be assigned-to a tech until all mandatory fields are completed. Any ideas how to make those variables mandatory AFTER the assigned-to is not empty?
Thank you!
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 08:06 AM
I appreciate your response.
I ended up having to create the following new Client Script just for this one catalog item to meet our needs, as a Catalog UI Policy script did not work:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 12:21 PM
Hi @Roberta B ,
The auto generated task ( via workflow ) should assign to some assignment group ( Tech Team ). After the SCTASK's mandatory variables & assigne_to can be update together.
If the above solution not works for you then the SCTASK's mandatory variable should not mandatory until open/or/work in progress state, it should be mandatory when someone trying to close it.
You can write catalog client script and check the SCTASK status [ onSubmit ] if the new state = close complete or close incomplete and those mandatory variables are empty then throw the alert.
replace the "yourVariable" with the actual variable name and test.
function onSubmit() {
//Type appropriate comment here, and begin script below
if (g_form.getValue('state') == '3'){
if (g_form.getValue("yourVariable") == "" ) {
//alert("Please Select - Send task to Indirect Procurement Yes or No");
g_form.addErrorMessage('Please Fill the - Mandatory variable"');
return false;
}
}
}
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 01:49 PM
Hello @AshishKM -
I do have the Assignment group being set in the flow. I prefer to make the Assigned-to field be able to select a tech name in the Flow (vs. creating a Client Script), if the variables are mandatory in the SCTASK. However, how do I do that?
Here is that section of the flow:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 05:59 PM
Hi @Roberta B ,
Assignment Group is fixed for that catalog item but "Assigned To" can any one from the same group which is SCTASK level update, however you can set the "Assigned To" variable with some specific user then all such SCTASK will assigned ( default ) to same person.
Also, there will some email notification when a SCTASK is assigned to any group , that email will not trigger because of non-empty "Assigned To"
You can add "Assigned To" via , "Add field value" button, if you want to do that.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 02:15 PM
You could configure a Decision Table an use its output as input for an addition field (Assigned to) under input named Fields.