If state=resolved show msg on top of form of incident

Adi MD
Tera Contributor

If state=resolved show msg on top of form of

2 ACCEPTED SOLUTIONS

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

You can write a UI policy on the table:-

 

Select condition as state is resolved 

 

Saurav11_0-1667633876065.png

 

 

And the add the below script in execute if true:-

 

g_form.addInfoMessage('your message here');

 

OR 

 

In on change client script please use the below code:-

 

if(newValue==6)// Assuming the value of resolved state is 6
{
g_form.addInfoMessage('Your message here')
}

 

Please mark my answer as correct based on Impact. 

View solution in original post

Hi @Adi MD 

That happens because you are not controlling your scenario on the code.

On a onChange client script you have the "newValue" variable. What you are saying is that when the user changes the state to newValue=Resolved, then you what to display the information right?

Then add this code before your message, assuming 6 is the value for resolved:

   if (newValue == 6)
      g_form.addInfoMessage("your message here");

 


If I helped you with your case, please click the Thumb Icon and mark as Correct.


View solution in original post

3 REPLIES 3

Adi MD
Tera Contributor

We can us on change and select field as state with g_form.addinfo but that applies to every time state change how to do specific for resolved only 

Hi @Adi MD 

That happens because you are not controlling your scenario on the code.

On a onChange client script you have the "newValue" variable. What you are saying is that when the user changes the state to newValue=Resolved, then you what to display the information right?

Then add this code before your message, assuming 6 is the value for resolved:

   if (newValue == 6)
      g_form.addInfoMessage("your message here");

 


If I helped you with your case, please click the Thumb Icon and mark as Correct.


Saurav11
Kilo Patron
Kilo Patron

Hello,

 

You can write a UI policy on the table:-

 

Select condition as state is resolved 

 

Saurav11_0-1667633876065.png

 

 

And the add the below script in execute if true:-

 

g_form.addInfoMessage('your message here');

 

OR 

 

In on change client script please use the below code:-

 

if(newValue==6)// Assuming the value of resolved state is 6
{
g_form.addInfoMessage('Your message here')
}

 

Please mark my answer as correct based on Impact.