Good Afternoon Markus.
As a starting point for you to further exploit on this, please check the below information which gives you a start in 'scripting' SC-form(s).
https://docops.ca.com/ca-service-management/14-1/en/using/service-catalog-management/manage-forms/perform-automated-tasks-in-form-fields/use-javascript-functions-in-fields
Typically, you specify a custom JavaScript function in one of the following:
-The onSubmit or onLoad attribute of the form attributes
-The onChange or onValidate attributes of applicable fields
E.G. To stop unsaved table rows from submitting the request.
onSubmit script:
submit : function() {
if(ca_fdGetSavedNonEmptyTableRowCount(ca_fd.formId, 'tblRecursos2') < 1){ alert('Table must have at least 1 entry');
return false;
}
else
return true;
}
Or
In OnSubmit attribute of a form, you can put any js function there.
It will invoke it at the submit point.
If that function returns true, the request will be submitted.
If it returns false, it will not be submitted.
Or
alertSelect:function(){
alert('alertSelect() invoked');
var selected = ca_fdGetSelectedOptionValues(ca_fd.formId,'users2');
if (selected =='spadmin'){
alert('Selected value match: '+selected);
}
else {
alert('Selected value mismatch: '+selected);
}
}
Thanks and kind regards, Louis van Amelsfort.