I have a file attachment control with repeating rows for attaching multiple documents on my smartform.
Is there a way to validate that at least one attachment is present in a File Attachment control? The "Form passes validation" rule will allow me to select the attachment control(s), but one never validates even if attachments are present and the other always validates even if there isn't an attachment.
Solved! Go to Solution.
I assume you are using a List View to for the multiple attachments? If so, then add a Count to the attachment column in the list. To do this select the column in the list view, and in the "Column" properties click Count under "Aggregations" . You can hide the control that is created, or even delete it, as the expression it uses will still be available.
You can then check the value of this expression when validating. Be sure to call the "Apply the changes made to the row on the editable list" statement before you validate to ensure the Count expression is updated.