- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016 05:45 AM
Hello All,
As per below screen shot you all can see this error message when any mandatory field is not fill, do any one have any idea how to edit this display message when any survey is taken.
Thanks & Regards,
Viraj Hudlikar.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016 02:04 PM
The UI page called assessment_take2 when the user taking the survey . So navigate to "UI Pages" -> Search by name "assessment_take2" . Open the page and go to the client script .
The function showInvalidFieldsMessage() hold the message that you can edit to show the message as you like .
if (numInvalidResponses > 0) {
var msg = assessableLabel + ' ' + numInvalidResponses + ' invalid response';
g_form.addErrorMessage('There are invalid responses in the following areas:');
You can edit the above error message .
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016 11:20 AM
Hi Raj,
check this link: http://wiki.servicenow.com/index.php?title=Scripting_Alert,_Info,_and_Error_Messages#gsc.tab=0
hope it's will help you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016 02:04 PM
The UI page called assessment_take2 when the user taking the survey . So navigate to "UI Pages" -> Search by name "assessment_take2" . Open the page and go to the client script .
The function showInvalidFieldsMessage() hold the message that you can edit to show the message as you like .
if (numInvalidResponses > 0) {
var msg = assessableLabel + ' ' + numInvalidResponses + ' invalid response';
g_form.addErrorMessage('There are invalid responses in the following areas:');
You can edit the above error message .
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2016 01:52 AM
summ Very much thanks for helping me out just one thing this will affect globally as any mandatory message will show same error message can we make it specific as if for one survey i want to use this default message but for some survey i want to use my custom message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2016 11:35 AM
Yes . You can do that by checking sys_id of the survey before showing the error . You can do that by
var typeId = gel('type_sysID').value; // This will give you the sysID of the Survey . Compare this with the Sys ID of the survey that you want to show specific error to the user .If matches then show your own message .
Ideally you can put the above conditional check in the method showInvalidFieldsMessage () to show different error message specific to one survey .