Help me with variable editor (Formatter)

Natan Felipe
Tera Expert

I need to display the value of the "Material type" field but the "material type" field is being cleared after activating read only in the formatter variable editor.

I want to understand why this is happening and where can I go to fix it?

I'm new to ServiceNow, I'm still learning a lot of things, to solve this problem I've already looked at business rules to see if there is any script with missing code.

 

Before the screen loads completely

find_real_file.png

 

After the screen loads completely

find_real_file.png

 

I thank you all for your help!

1 ACCEPTED SOLUTION

Narsing1
Mega Sage

Hi,

Hope its a RITM view. Please check these areas in your catalog Item.

Did you enable the UI Policy to run only on Catalog Item view / RITM level as well.  If so, try to uncheck in RITM level

find_real_file.png

Also, check the UI Policy Action for this variable whether you have checked "Clear the variable value".

find_real_file.png

Please mark it as correct answer if it helps

Thanks,

Narsing

View solution in original post

9 REPLIES 9

Thanks!

Natan Felipe
Tera Expert

Unfortunately I still couldn't solve the problem I didn't finish looking at all the onLoad scripts.

But thanks anyway!

rahulpandey
Kilo Sage

Hello Natan,

The probable reason would be an onload catalog/client script. Best way to debug this is by using JavaScript Log and Field watcher. Refer below screenshot to activate it(note, this works only with gsft iframe and doesn't work in new tab) 

 

find_real_file.png

I tried to mimic this, and I could see the responsible script which clears the value. Screenshot below

 

Thanks!

Natan Felipe
Tera Expert

Hello community,
I managed to find the solution to the problem, in the end it was just clearing the check box, I thank everyone who tried to help me and that your answer helped me and taught me a lot.

Thanks!

 

arrow showing the option where I deselected

find_real_file.png