cancel
Showing results for 
Search instead for 
Did you mean: 
AUSharePoint
Nintex Newbie

JS to Determine Attachment Field Is Not Empty

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.

example

Reply
3 Replies
Automation Master
Automation Master

Re: JS to Determine Attachment Field Is Not Empty

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?

0 Kudos
Reply
AUSharePoint
Nintex Newbie

Re: JS to Determine Attachment Field Is Not Empty

I've got it worked out. So I have spoken to another Nintex expert ‌ who explained that I can accomplish what I'm trying to do with an action set in a workflow. I can pull out the number of attachments per control and use that variable in the workflow. 

Thank you for your assistance.

0 Kudos
Reply
Automation Master
Automation Master

Re: JS to Determine Attachment Field Is Not Empty

great!

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.

0 Kudos
Reply