Very often there is a need to make sure the user has added an attachment to the task(Attachment added to the attachment tab).There is no out of the box way to find out if the task has attachments and prevent the user from submitting the form if there is no attachment
I have written a simple process which given a taskID would return the number of attachments associated with the task
You would then call this process from your form as a web service.The input parameter for the web service is going to be the value of the field AWS_TASKID which is part of the processfields.The return value of the webservice is stored in a hidden field.We then check to see if the value of the hidden field is “0” which means there are no attachments associated with the task. All this logic is put in the click event of the AWS_SUBMIT button which is again part of the process fields.
I have put together a simple process which would explain to you the finer points. Click the following link to access the collateral for this process. The collateral are added as file attachments.Click the paper clip icon
let me know if you have any questions