srstatham
Novice

Require Attachments in File Attachment Control

Jump to solution

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.

0 Kudos
Reply
3 Replies
Albarghouthy
Apprentice

Re: Require Attachments in File Attachment Control

Jump to solution

Hi,

 

did you try this:

 

3147iB9C2E5F4324C41C5.png

0 Kudos
Reply
Andrew_Blinco
Apprentice

Re: Require Attachments in File Attachment Control

Jump to solution

Hi srstatham

 

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.

Reply
srstatham
Novice

Re: Require Attachments in File Attachment Control

Jump to solution

Andrew_Blinco,

 

That works! Thanks!

0 Kudos
Reply