Marian Hatala -- I love your script from your posthttps://community.nintex.com/message/42747?commentID=42747#comment-42747 ... 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.
as I've tried to explain here https://community.nintex.com/thread/16854-need-to-verify-multiple-attachments-controls-are-not-null#..., capturing change event on attachment control is not so easy/straightforward.
likewise, as explained here https://community.nintex.com/thread/16854-need-to-verify-multiple-attachments-controls-are-not-null#..., to determine whether an item has an attachment in workflow can be achieved with ItemProperties and you do not need to save this info from form.
does these explain your concerns?
would you mind to share you solution here? or if it was another thread on the forum a link might be sufficient.
It will help others that will come across this question.