within a repeating section I have a field titled evidence which is a yes or no choice. I am trying to come up with a solution where if there is 5 rows in a repeating section and 2 of those rows have the evidence field set to yes then the minimum attachments should be 2.
return NWF.FormFiller.Attachments.GetAttachedFilesCount(NWF.FormFiller.Functions.GetFillerDivObjectForControl(NWF$("#"+NWF$("." + attCtrlClassName + " .nf-attachmentsRow").id)).data('controlid'))
GetNumberOfAttachments("AttachedEvidences") != sum(EvidenceNeeded)
Tomasz Poszytek, got any solution for responsive forms?
Nope, I don't. I suggest you to play around with rules. Maybe it would work if you use expressions to count rows and attachments, then to compare both outcomes. But I don't know if that is feasible.
tel: +48 603 993 372
www/ blog: https://poszytek.eu
Elias Hantzis has my solution worked for you? If so, please mark my answer as correct. Thanks!
I haven’t had time to implement this solution. My apologies.
Country Regional Network
Level 1, 20 Smith St, Parramatta NSW 2150
P. 02 9685 5102 | M. 0429 316 344
E. firstname.lastname@example.org<mailto:email@example.com> | W. www.jhrcrn.com.au<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.jhrcrn.com.au_&d=DwMFAg&c=lf6PGhmJKTmtyLqIXF-b3g&r=oi-x6Eop3DYWSyK3Jf-DWEBgAuveIetvY3OetEzQWds&m=iulocyipyzo_ZFuzm6Y5X2-1n4dMex3ucEShrZ0eegg&s=OL14ujiwqUNA-ejEfAZjSMPA_PuC5pH8g1eI_daROL4&e=>
No problem. Find your time and post a feedback
The described solution was tested by me and was working fine.
Hi Tomasz Poszytek,
I tried your solution on the responsive form and it's not working. It seems there is no validation at all in this control (even with simple validation rule).
Did you find other solution to this issue?
that solution was indeed for Standard forms, not RWD. If there are no rules to count number of attachments in RWD forms, then there is no way to achieve it. If you need such functionality maybe consider switching back to Standard form?