Sutekh
Workflow Hero

Making a field mandotary for some users and not for others

Afternoon

 

I'm trying to make an attachment field in my Nintex form mandatory for a group of Line Managers and not mandatory for our IT department. Is there a way to do this? All help appreciated!

Tags (1)
0 Kudos
Reply
1 Reply
allan
Process Pupil

Re: Making a field mandotary for some users and not for others

The only way is to define a new JavaScript function to check how many attachments are there.
Place that in the JavaScript section of your form settings.

 

function GetNumberOfAttachments(attCtrlClassName){
   return NWF.FormFiller.Attachments.GetAttachedFilesCount(NWF.FormFiller.Functions.GetFillerDivObjectForControl(NWF$("#"+NWF$("." + attCtrlClassName + " .nf-attachmentsRow")[0].id)).data('controlid'))
}

 

And use it in a validation rule this way :

 

GetNumberOfAttachments("CSS Class of your control") < 1 && fn-isMemberOf("Your group")

 

Reply