Field message disappears (without using hideMsg) when the value of the field changes. Is it a servicenow bug?

Smith Johnson
Tera Guru

Hello,

I noticed a strange behavior on one of my catalog items.

I have a form, like this in my personal dev instance:

find_real_file.png
When the user changes the "Name for requestor" field, a msg is displayed unter my test field.

find_real_file.png
When the user inserts a value on the "test" field, the msg is hidden. I want this msg to be visible always.
find_real_file.png
And this is my catalog client script.
find_real_file.png

Super strange, any ideas why this is happening?
Is this a bug?
Is there any way to show the msg always to the user????

Thank you,
Smith.

10 REPLIES 10

Hi,

annotation type variable what do you mean??

I can't find a type of "annotation".

Could you please clarify it? 🙂

find_real_file.png

If this answer is helpful please mark correct and helpful!

Regards,

Christopher Perry

If this answer is helpful please mark correct and helpful!

Regards,
Chris Perry

Hi Christopher,

 

this does not serve my use case. I want the help text or the msg to be changed dynamically based on the user's input. If I use the help text, it will always be the same.

That's why I used the showFieldMsg.

Sorry, I was thinking about Forms.  For a Catalog Item or Record Producer add a Label type.  Or, using the Annotation checkbox method on the field itself with Always Expanded checkbox checked if having the message above the field is okay.

I see that @christopherperry helped with the "bug" part.  I actually prefer the way it works right now, a field message should go away when you exit the field it is attached to unless you add one back with an onChange to that specific field.  Just my opinion.

Thanks,

Aoife

Hi Aoife,

the issue with the Annotation and the Always expanded, is that I want to change the annotation text dynamically.

Also, the label variable does not serve me, because the only way to change the label is with DOM manipulation which is not recommended.

It seems that the bug blocks me from the logic that I want to put in the catalog item.

But thank you for your ideas 🙂