Checkboxes Not Changing Value

raprohaska
Kilo Guru

We have a strange issue. Our incident table seems to be corrupt. We are now unable to change the value on any check-box. But let me clarify. The user can click and change the check-box, but the value behind the check-box doesn't change. So if the check box checked = false, user changes to true, user clicks save, form reloads... value is still false.

I debugged the client side and placed a break-point on the built in onChange event:

function onChange(elementName){

      var eChanged = gel(elementName);

var eOriginal = gel("sys_original." + elementName);

You see it grabs the original value and the new value. New value is placed into eChanged. No matter what the check-box's checked value is, the eChanged value is always = to the eOriginal value.

This is a strange one. I don't see any other code fire before this even so I don't see how anything we implemented is changing the value. It only affects our incident table. I'm wondering if anyone out there has ever seen anything like this before. I'm sure we changed a configuration that is causing this as it was working and is only affecting the environments that we have done recent changes to, DEV and SBOX.

Thanks,

AA

14 REPLIES 14

marcguy
ServiceNow Employee
ServiceNow Employee

slightly long shot but it's not because you have the fields on the form twice anywhere is it? I've seen fields duplicated on a separate tab and that causes issues with updates.


Yes, the person who built the form had a hidden tab that these fields were on as well.



Thanks


Thanks for the replies.   That was the case there was a duplicate field that was preventing the update of that checkbox.



Thanks,


Mike


The SN Nerd
Giga Sage
Giga Sage

If you disable all client scripts and UI policies, does the issue still occur?



When you watch the field in the field debugger, it should tell you what (if anything) is changing the value.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

marcguy
ServiceNow Employee
ServiceNow Employee

Hi Paul, I think we found the cause to be duplicate fields on the form, Steven if that's correct do you mind marking it as Correct Answer when you have a minute.



thanks,


Marc