Nintex Forms O365 - Calculated Field Not Updating

  • 16 January 2019
  • 1 reply
  • 8 views

Badge +9

I'm attempting to get a calculated field to update as the dropdown values change.

In the example below - the problem is that the calculated value refuses to change if only "Landscape" is selected and subsequently unchecked. This issue does not occur if "Portrait" is already checked.

There is no problem with the "Portrait" option - the calculated value always updates correctly.

Is there something wrong with my script?

222009_pastedImage_1.png

NWF$(document).ready(function () {
    NWF$("#" + PosterOrientation).change(function () {
        if (!NWF$(this).find(':checkbox[value='Portrait']').prop('checked')) {
        NWF$("#" + NumberRequiredPortrait + " option:selected").removeAttr("selected").trigger('change'); }
        else 
        if (!NWF$(this).find(':checkbox[value='Landscape']').prop('checked')) {
        NWF$("#" + NumberRequiredLandscape + " option:selected").removeAttr("selected").trigger('change'); }
    });
});


1 reply

Badge +17

Perhaps change the selection for orientation to radial buttons so only one choice can be selected and see if that works. I know multi-choice columns does something odd to the choice and that may be confusing it on the backend when its expecting a particular output.

The other thought was remove the else, and ensure that the logic for each one works on its own.

Reply