2

I know that in SharePoint Designer workflow it can be checked when attachments are added, but this isn't so super, because when there is some attachment in the list item and someone forgot to add other attachment, then workflow can't check this. So is it possible to check this e.g. via PowerShell?

  • 1
    You want to check for how many attachments? – Mihir Sep 12 '17 at 13:06
  • It will work like question with attachment and answer with attachment. So mostly only one more. – Zbyna Sep 14 '17 at 6:30
  • Assuming you are doing 2013 workflow. why don't you check the attachment count in workflow? please use rest api to fetch the attachment file count.. Hope this link helps you...social.technet.microsoft.com/Forums/SharePoint/en-US/… – Pradeep Kumar Mar 15 '18 at 4:52
0

So, now I use jquery function in new and edit form:

function PreSaveAction()  
{  
    var elm = document.getElementById("idAttachmentsTable");  
    if (elm == null || elm.rows.length == 0)  
        {  
                document.getElementById("idAttachmentsRow").style.display='none';  
        var r=confirm("some text");  
            if (r==false) {  
                return false;  
            }
            else {
                return true;
            }

        }
    else {
        return true;
    }
}

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.