Skip to main content

I have a NWC Form which allows the user to attach a file which I then upload to a SharePoint online library.  In the upload action, I created a folder using the Firm Name which is entered on the form.  I have run into an issue when someone enters special characters in the Firm Name as SharePoint don't allow special characters in the naming of folders.  

 

I've tried using Apply a regular expression action but I'm really bad at regex.  I've been able to get there somewhat by use the Replace operation with expression s^w] and using an underscore character to replace. But what I really want to do is remove the special character entirely but the Replace text field cannot be left blank.

 

Help!

 

26431i9EE4127CD4DF6ADF.png

 

 

Hi @tmfitz 



 



Refer this article



https://community.nintex.com/t5/Responsive-Forms/Filename-entry-in-Responsive-forms/td-p/221644 



 





This reads as Replace (Not Capital A-Z)(not Smallcaps a-z)(Not 0-9)(Not -space- char) with underscore "_"



 


Thanks @Garrett.  I was able to achieve that on my own. What I really want to do is remove the special characters from the Firm Name. Sorry if I wasn't clear.


Use this. It will replace with an empty char (essentially removing any invalid chars)



replace([Form].[FileName],"[^a-zA-Z0-9- ]","")



 



The previous (below) will replace with underscore.





 



 


Thanks. That worked. This is the function I ended up using - 



 



replace([Form].[Firm Name],"[^a-zA-Z0-9- ]","")


Reply