ramanjjilunaidu
Forms Fledgling

Validation Rule and button click function not working in Nintex form

Dear All,

I have created a validation rule as below, Status is a dropdown.

1. Status == "Waiting for Approval" && isNullOrEmpty({Self})

2. and(calcStatus=="Waiting for Sponsor Approval",isNullOrEmpty({Self}))

calcStatus is storing dynamic value of dropdown value (Status)

Both are not executing 

ramanjjilunaidu_0-1622131235508.png

Also i have custom button click event as below, here i get two times alert and submitting an item.

NWF$('.nf-sponApprove').click(function(){
var scomm = NWF$('#'+varsponDisc).val();
if(scomm == ""){
alert("Please input sponsor comments");
}
if(scomm) {
NWF$('#'+varStatus).val("Sponsor Approved");
NWF$(document).submit();
}
});

 

Any help would be highly appreciated. Thank you advance.

Regards

0 Kudos
Reply
2 Replies
shr47k
Design Dabbler

Re: Validation Rule and button click function not working in Nintex form

Hi,

Your first condition should work ok provided the Status being checked is correct( 'Waiting for Approval'. should it be 'Waiting for Sponsor Approval' ? ).

 

The rules can be a little tricky. If a rule isn't working; you can try some troubleshooting steps:

1) If some references were copied into the formula; try to re add them by selecting again from the builder

2) Add some Parenthesis. Simple; but can work and also improve readability in long conditions.

3) If the formula has been manually built and checked for typos; see whether there is room for refactoring. Eg: Like you have used  && operator instead of the fn.

4) Check the Browser's Console to see if an error is preventing the correct execution of Form.

 

Note
-------

The 'Named Control' can be used to get the dynamic value set from Form.

'Item Properties' will read the values saved in SharePoint when the form Loads.

shr47k_0-1622198888625.png

 

Regards

Reply
ramanjjilunaidu
Forms Fledgling

Re: Validation Rule and button click function not working in Nintex form

tried to reconstruct the same rule but still not working.

0 Kudos
Reply