how do you ensure attachment mandatory-ness? by a rule or javascript or ...?
Hi Marian,
Using by Rule isNullOrEmpty({ItemProperty:Attachments});
Is there any way to get a error message in pop up.
Thanks,
Santhosh
you can do it eg. following way:
add following at the end of your rule: && myAlert("field is empty")
and add following custom javascript code into form's settings:
function myAlert(txt){
alert(txt);
return true;
}
Hi Marian,
Working ,But the problem is now the form is not submitting, keep getting a alert , when ever i click a save button , even if i attach a file also.
Regards,
Santhosh.
Hi Marian ,
The code is working fine .
1) first i added this rule " isNullOrEmpty({ItemProperty:Attachments}) && myAlert("Please Attach the file") " into Attachment filed rule place.
2) Then i added the below code in nintex form seetings under custom javascript field.
function myAlert(txt){
alert(txt);
return true;
}
It is validating and giving pop up but , even if i Attach file also, the form is not submitting . below i attached Screen shot please find out.
Help me out with the solution.
Thanks,
Santhosh.
I havn't noticed that but problem is in your condition. since you've written the condition is working for you I haven't checked it through.
problem with it is that you check item's property and it gets populated just after you submit the form. all the validation rules (especially in new form/mode) should be based on named controls and not on item properties
have a look here for a better way how to ensure attachment is added to the form
https://community.nintex.com/message/42747#comment-42747