Skip to main content
Nintex Community Menu Bar

Validation Rule to Require Attachments

  • September 27, 2019
  • 3 replies
  • 101 views

Forum|alt.badge.img+6

Nintex in SPO

 

Very simple validation rule needed.  I have an "Attachments?" question.  If the User selects "Yes," I want an attachment to be required.  

 

A simple Validation rule on the Attachment control like this should work, right?

IsNullEmpty(Self)&&Attachments=='Yes' 

 

Is there seriously no way to accomplish this without using JS? 

 

4793i920051118D72D838.png

3 replies

Forum|alt.badge.img+12
  • Scholar
  • October 1, 2019

@anderj39 .....I'm not sure if File Upload have the option of Minimum Attachments in Validation or not?

 

In on-prem attachment control do have the option to provide minimum attachments and maybe using run time formula we can set the value to be either 0 or 1 based on AttachmentDD value.

 

But if that's not the option then instead of using your formula try to use If statement in validation rule of attachment control

 

If(equals(AttachmentsDD, "Yes"), If(isNullOrEmpty(ItemProperty:Attachments), "Please attach files", false), false)


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • October 1, 2019
I dont think ItemProperty:Attachments will work on a new form as the item would not have been created so therefore this would always come up as zero or null.

Forum|alt.badge.img
  • Nintex Partner
  • October 8, 2020

Was this ever solved, I have the same issue.  Need to conditionally require attachments.