FIeld message is not showing up in service portal but working in ITIL view

naveenmyana
Giga Expert

Hello,

I have written a catalog client script to display a field message below a label variable and is working as expected in ITL view but for some reason it is not working in portal. 

I have set the UI type to all in client also but not able to figure out the issue, Please suggest.

 

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
// g_form.hideFieldMsg('terms_of_use',true);
return;
}
var msg = " Some files can be restored without additional help. Please follow the steps to restore the lost file from the shared drive. *If you cannot restore the file please complete the form and submit the request. *• Please select the Shared Drive. *• Right click on folder and click on Properties. *• Click on previous version tab and select the desired previous version. *• Click on Open button & browse for missing files/data. *• Select the required missing file/data. *• Copy those & paste it to User's local disk.";

if(newValue == 'shared_network_drive'){
// alert('test');
var spli = msg.split('*');
var len = spli.length;
for(var i=0; len>i; i++){
g_form.showFieldMsg('terms_of_use',spli[i],'info');
}
}
else{
g_form.hideFieldMsg('terms_of_use',true);
}
// //Type appropriate comment here, and begin script below

}

9 REPLIES 9

RAHUL Khanna1
Mega Guru

is that complete script ..or you are running some thing else as well ....

RAHUL Khanna1
Mega Guru

if possible can you paste the screen shot of bith the script and the form,,,,,

Hi Rahul,

 

That is whole script and no other scripts I am running here on item.

find_real_file.png

find_real_file.png

find_real_file.png

Above screenshot highlighted is in portal view, The message is not displayed.

g_form.showfieldmsg does not work on the label, but it works on other type of the question. Try on some other variable and see if it works.

is it only with portal or on platform as well