Invalid characters in attachment file is crashing Forms and Workflow

  • 1 December 2015
  • 9 replies
  • 10 views

Badge +4

I have Nintex Forms 2013 (v.2.8.1.0) with Nintex Workflow 2013 (v.3.1.6.0)

I made a Nintex Form with an attachment control that fires a Nintex Workflow after submit.

If the user loads a file with an unsupported name (~ # % & * { } : < > ? / + |), the control loads it. But the user is not able to delete it. Clicking on "Delete" button is doing nothing, and the user is not able to replace the file by another one.

148335_pastedImage_1.png

It blocks completelly the Workflow, due to after submit SharePoint show up an error message:

148336_pastedImage_2.png

And Workflow doesn't start, even if the workflow is set to start when a new ítem is created. the ítem is created, but the workflows doesn't start.

It is a really big issue, crashing the whole solution.

Please, can you fix it?

Kind regards,


9 replies

Userlevel 6
Badge +16

I suggest you to send your case to Support

Userlevel 6
Badge +16

Have you seen that? >>> illegal characters in attachment name ?

Badge +4

Hi Fernando,

Yes, I saw it, thank you! But the thread ends with some kind of fórum about if this is a Nintex bug or not, and no clear answer about how to fix it.

For my it's clear this is a bug. It crashes the form and the Workflow never starts... I have a customer complaining about it, and there's no easy solution, only custom Javascrip? If we need to solve all Nintex issues by JavaScript, then is really Nintex Forms usefull (more code than form parametrization has no sense for me).

Kind regards.

Badge +4

I did it, thank you! But they seems to "not be able to reproduce it"...

:-(

Badge +3

Did you ever find a fix for this? I have a similar issue where items that have these attachments do not start the workflow.  Just wondering if you tried writing a validation rule in the form?

Badge +7

Same for me with a simple quote (') in filename : upload OK but no way to delete the attachement after upload.

Support answer : this will be included in a future release.

Userlevel 5
Badge +12

Invalid characters will result in error, it will result in the error you displayed in the post above.   The current work around is to use JavaScript to prevent invalid characters being entered into the attachment field.  If you search around the forum you'll find other posts surrounding how to implement this.

Thanks!

Mike

Badge +4

I tried to open a support case, but the answer was that there were unable to reproduce the case.

After some mails trying to explain them that it was really simple to reproduce it, I gave up with support guys and I did my own solution with JavaScript (once again).

I really hope they will realize that this is a bug and future versions doesn't allow to upload files with wrong characters.

Best regards,

Badge +4

Hi Adrian,

Actually I know this is not a polite resolution, but at the moment it was the easy way I've found:

1 .- I created a single line control, to store a string with the sum of all the attachment names (str1+str2+str3...). This is necessary to have a form field that we can use in our validation rule.

185512_pastedImage_0.png

2.- I hide this control from the JavaScript code (It's only for validation proposals):

   $('.Form_Attachments_Name').hide();

3.- I added a listener to my attachment control, capturing all changes on it (new attachments, for instance)

$('table.nf-attachmentsTable').parent().attr('onchange', 'AttachmentChanged()');

4.- I created a function to get the sum of all the attachment names and set the created single line control with the result.

function AttachmentChanged(){

   var attachNames= $(".nf-attachmentsTable span");

   var SumOfNames="";

   $.each(attachNames, function( index, value ) {

      debugger;

      SumOfNames+= value.innerText;   });

   NWF$('#'+Form_Attachments_Name).val(SumOfNames);

}

5.- I created some validation rules over the attachment control, looking like this one (one for each non-authorized char):

185522_pastedImage_7.png

This is running well on my form:

185524_pastedImage_9.png

185523_pastedImage_8.png

Complicated? YES, AND THIS THE KIND OF STUFF THAT NINTEX IS FORCING ME TO DO IGNORING THIS ISSUES.

If you have a better solution, it would be great to know (please share it!)

Best regards.

Reply