JS to Determine Attachment Field Is Not Empty

Discussion created by sharepoint-auburn on Jul 11, 2017
Latest reply on Jul 13, 2017 by emha

Marian Hatala -- I love your script from your post ... and you have assisted in validation on a form.


However, I'm trying to capture the value from your script when an attachment is added to the page. I'm trying to get this to update a variable which updates a field that corresponds to that attachment to "Yes" for me to use in a workflow. Once all attachments are uploaded the workflow can continue. 

In the screenshot there I'm testing 2 things I have a calculated value with an If statement that should change to yes if 

(GetNumberOfAttachments('attCtrlSec')<1) and the other is a calculated value that should show the value of GetNumberOfAttachments('attCtrlSec'), but as you can see once I add the file to upload it doesn't change. 

It also does not change on submit. 


NOTE: I have validation using your script so we know it's firing.