For SP/Nintex 2016 on prem, in a form, what is the rule formula to ensure attachments are added IF a certain field (which is named and inside a panel) is not null. In other words, If the user enters data into a field (single line of text), Attachments are required. Otherwise Attachments are not required.
I created a rule on the SUBMIT button to Invalidate with the following formula but it’s not working as desired.
The issue with your rule is that you are using {ItemProperty:Attachments}. This looks at the attachments on the SharePoint item when the form is in edit mode and not the attachments on the attachment form control. The only out-of-the-box validation for the Attachment control is in the control's configuration, but it is limited to the number of required attachments. The link below shows how you can make the attachment control require one attachment and then hide it. While the attachment control is hidden, the validation will not trigger. You can then configure a rule that unhides the attachment control when the NamedControl is not empty.
The issue with your rule is that you are using {ItemProperty:Attachments}. This looks at the attachments on the SharePoint item when the form is in edit mode and not the attachments on the attachment form control. The only out-of-the-box validation for the Attachment control is in the control's configuration, but it is limited to the number of required attachments. The link below shows how you can make the attachment control require one attachment and then hide it. While the attachment control is hidden, the validation will not trigger. You can then configure a rule that unhides the attachment control when the NamedControl is not empty.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.