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

Mark Stanger
Giga Sage

One thing to check is whether the edits stick when editing from somewhere other than the form.   This will tell you if the issue is related to a client script or UI policy, or a business rule or security rule.   Does the change work correctly if you do a list edit on the field?


Good question. I can change the value in the list view. Then it will be "stuck" with that value when editing from the form.



So if checked, always checked. If unchecked, always unchecked.



Great idea


If I understand you correctly you're saying that the list edit is successful in updating the value in the database and executing the change as expected.   If that's the case, then the problem is with one of your UI policies or client scripts.   You can check your browser console for errors as one troubleshooting step.   Aside from that, you might just start de-activating the UI policies and client scripts you've modified recently as a process of elimination.


I've been watching the console and nothing stands out. My first thought is that there was some client script changing the value, but I believe this event happens prior to any UI Policies or client script being run.



If I manually change the value of eChanged in the browser, then everything runs as expected.



I'll look into deactivating scripts and policies but I would expect those to only affect one specific check-box and not every boolean value on the table.



Still, good suggestion, it is a big undertaking and I'm a bit nervous 😉