Skip to main content
Nintex Community Menu Bar

How to avoid file attachments with \special characters\" in file name?"

  • April 12, 2016
  • 33 replies
  • 575 views

Show first post

33 replies

Forum|alt.badge.img+11
  • Nintex Partner
  • August 29, 2017

Hi Federico,

this Regex should work:

^(.)*(..)+(.)*$

Matches any string that has at least 2 "."

After checking for special characters you can check your attachments file name again to avoid having double "." inside


Forum|alt.badge.img+8
  • August 29, 2017

Thanks.

Fms.


Forum|alt.badge.img+9

What do you put under client click on the submit button?


Forum|alt.badge.img+11
  • Nintex Partner
  • April 25, 2018

For using this version you shouldnt need to put anything on the client click. The name gets validated whenever you try to add an attachment.

Cheers

Philipp


Forum|alt.badge.img+3
  • Author
  • April 25, 2018

I just received a note from another user with probably a better solution.

But I do not put anything in the Client Click field. I just have a validation rule on the form (example below) and make sure that the Submit Button does validation. This way, I also get to display a more descriptive error message.

Thanks,

Ron Pillsbury

Business Systems Analyst

Goodwill Industries of Northwest NC

2701 University Parkway, Winston-Salem NC 27105

T| 336.724.3625 x1333 C| 336.749.8009

rpillsbury@goodwillnwnc.org<mailto:rpillsbury@goodwillnwnc.org>


Forum|alt.badge.img+9

Can you post detailed steps with screen shots on what you did to achieve this?


Forum|alt.badge.img+7
  • Rookie
  • October 4, 2018

Thank you for this JavaScript function. It works great except I have one issue I'm not sure how to tackle now. I have some validation rules that don't seem to be firing at all now. If I remove the JavaScript function in the button's client click setting, then my validation rules behave as expected. I'm not sure how to get both the JavaScript and the validation rules to work in harmony.


Forum|alt.badge.img
  • June 1, 2022
This is a very nice solution with a minor bug. Based on my tests if you edit a form with an already uploaded attachment it will fail on file.find('span')[0].innerText, because the find('span') will be null.

It should be assigned to a variable and checked by an if.