Skip to main content
Nintex Community Menu Bar

Reset checkbox.

  • March 29, 2018
  • 2 replies
  • 11 views

Forum|alt.badge.img+6

Good Day Team,

I am trying to evaluate some conditions in my approval Task "Approved/Rejected" If the task is rejected then I need select an extra reason " Terminate Workflow, Request Information, Escalate", however if the user has selected rejected and after that he decide change to Approved I need reset the choices or extra reasons whatever that was.
To reset the fields I have used the following code but it is not working, any suggestion will be great.  I am using nintex on premise 

214124_pastedImage_2.png

NWF$(document).ready(function () {
NWF$("#" + varabc).change(function () {
if(!NWF$(this).prop('Rejected'))
NWF$("#" + varbcd).attr('checked', false);
});
});

2 replies

MegaJerk
Forum|alt.badge.img+14
  • Scholar
  • March 30, 2018

Something along these lines should work:

NWF$(document).ready(function() {
  NWF$("#" + varabc).change(function() {
    if (NWF$("#" + varabc).find("input:checked").siblings("label").text() === "Approved") {
      NWF$("#" + varbcd).find("input:checked").prop("checked", false);
    }
  });
});

Does this solve the problem? 


USMCdave
Forum|alt.badge.img+3
  • August 30, 2019

I don't have the code in front of me right now, but I did something similar with a checkbox.  I think you want to set the value of varbcd to null.  Something like:

NWF$("#" + varbcd).val('');