File Field Limit

Michael Confessore December 4, 2020

I am using a File Field Definition on a confiform and I would like to limit the user to only be able to add one file per form. Is there a way to set this via validation rule?

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2020

Hi

As this field type is really a multi-value holding field (you can have multiple attachments per file field per record), you can use asCount virtual function to check how many files holds this field on form submission

The easiest way is to add a ConfiForms Field Definition Rules macro with "Validate" action with condition set to something like (assuming your field field is named "myfile")

myfile.asCount:>1

(dont forget to set error message parameter on the macro!)

Alex

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events