0

I've created a Sharepoint List form in Infopath 2010 and want to make sure that Attachment control has at least 1 file present. I've noticed that Rules are grayed out (disabled) when I select the Attachment field. I've a custom submit button which has set of rules. I want to validate the attachment control field.

0

Infopath doesnt allow validation rule for attachements. Below is a workaround.

Source: https://maxmorrow.wordpress.com/2012/05/03/infopath-2010-validating-the-attachments-field/

  • Create a text field to use for validating purpose (name it something like 'Attachment Validation').
  • Place it on your form and remove the borders and shading. Open the field text box properties under the Display tab and set it to Read Only and set the default value to "Attachments"
  • Place a validation rule on this field. The condition should be 'The Expression' and set it to

    count(../my:Attachments/attachmentURL) = 0

The expression basically counts the number of attachments and if it equals 0 then it will put the red dashed line around the word Attachment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.