Show field message function in Service Portal

Nowlearner
Kilo Guru

I am using g_form.showFieldMsg option in client script to display a message below the field when the country field is selected as USA. It is working fine when i click try it at the item level but not in the Service Portal.  

Do we have to write any special line of code specific to work on the Service Portal?

1 ACCEPTED SOLUTION

This may also work:

g_form.showFieldMsg('display_name', 'USA timezone is different','info',true);

View solution in original post

9 REPLIES 9

SNOW User8
Giga Guru

Hi 

Check the UI Type, it should be selected as All 

ndt13
Giga Expert

Is the UI Type of the Client Script set to All?  If not, can you share more of the details of the script?

find_real_file.png

 

 

I did that with UI type as ALL but no luck.

I am trying to apply this client script on a variable set

applies to -- variable set

Type - onChange

variable set --- timezone

variable name --- display_name

UI type -- ALL

function onChange(control, oldValue, newValue, isLoading) {

if (isLoading || newValue == '')

{
return;
}
if(newValue == 'USA')
{
g_form.showFieldMsg('display_name', 'USA timezone is different');
}

Nowlearner
Kilo Guru

Can anyone help me on this?