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

Re: attachments custom validation

Jump to solution

The code is definitely not working on hide/disable. It's completely ignored in fact.

Try adding the following to a control. You'll notice that the control remains hidden even after an attachment is uploaded. Time for a code fix, perhaps?

0 Kudos
Reply
emha
Nintex Newbie

Re: attachments custom validation

Jump to solution

ah, sorry. I haven't immediately realized attachment control is one of those which formatting rules (resp. runtime functions) are not supported for.

see documentation - https://help.nintex.com/en-US/nintex2013/help/#Forms/RootCategory/Designer/Nintex.Forms.FormulaBuild... 

Reply
rhia
Nintex Newbie

Re: attachments custom validation

Jump to solution

I'm just popping in to say that none of these formats worked for me, so I ended up taking the " < 1 " portion and calculating the number in a calculated field, then using that variable in the validation. Works well for my purposes. 

0 Kudos
Reply
espradli
Nintex Newbie

Re: attachments custom validation

Jump to solution

You have to make sure your CSS class name on the attachment control does not have a space in it and it will work

0 Kudos
Reply
chaddavis
Nintex Newbie

Re: attachments custom validation

Jump to solution

This is exactly what I needed for attachment validation. Thank you!!

Reply
rhia
Nintex Newbie

Re: attachments custom validation

Jump to solution

Hey Marian Hatala‌ -- can you confirm if this should work in Repeating Section attachments, now that we have this as an option? I've your wonderful code work many times before but now trying it on a repeating section, I just keep returning "0" for attachment count.

0 Kudos
Reply
waltont
Nintex Newbie

Re: attachments custom validation

Jump to solution

I can confirm this answer with the explanation works perfectly on a custom list form. I did take a few minutes to actually test this out on a test site. The original answer's post is technically correct, but it did not provide the required details to achieve the objective where yours did. I was able to figure out how to unmark the other one and I have given the answer to you. Thank you. Sorry it took me nearly a year to do that.

Below is a screenshot of the proof of concept. You can see how I formatted on the right the conditions of the validation. I also had a formatting rule that hides the attachments field when the drop down shows "No". When in that condition, the attachments are not required:

0 Kudos
Reply
waltont
Nintex Newbie

Re: attachments custom validation

Jump to solution

You cannot add attachments into a repeating field. So unfortunately the answer to this is no. I just tested this out using the sample I posted above. I would imagine it works fine if you leave the attachments outside the repeating field if you follow the same guidelines as above.

0 Kudos
Reply
rhia
Nintex Newbie

Re: attachments custom validation

Jump to solution

Hey Tyler Walton‌ - 

Are you upgraded all the way? We have had this functionality since around March, I believe -- On-Prem & in Mobile, functionality confirmed & in production.


Cheers,

r.

0 Kudos
Reply
emha
Nintex Newbie

Re: attachments custom validation

Jump to solution

Rhia Wieclawek, When I was writing the code it was not supposed attachment control will ever be usable within repeating section. so it was not written to consider this at all.

... and I haven't investigated (yet) what would need to be changed to make it working.

but looking on how selectors are applied within the code it cannot work for multiple attachment  controls with the same class.

0 Kudos
Reply