Require Attachments in File Attachment Control

  • 18 November 2015
  • 3 replies
  • 8 views

Badge +1

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.


3 replies

Userlevel 5
Badge +16

Hi,

 

did you try this:

 

15565i6904CD21CEB3D734.png

Userlevel 1
Badge +8

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.

Badge +1

Andrew_Blinco,

 

That works! Thanks!

Reply