Hello,
I’d like to rework the name of an image file retrieved by a “get a file” using a text property, before uploading it via FTP.
Here is what I put in the “upload a file” module in the “file name” zone:
replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(lower(1. properties_value.Nom[].plain_text);"à|á|â|ä|ã|å";"a");"æ";"ae");"ç";"c");"è|é|ê|ë";"e");"ì|í|î|ï";"i");"ñ";"n");"ò|ó|ô|ö|õ|ø";"o");"œ";"oe");"ù|ú|û|ü";"u");"ý|ÿ";"y");"[^a-z0-9\\s-]";"");" ";"-");"^-+|-+$";"").jpeg
The problem is that it doesn’t work, the filename is just the content of property 1. properties_value.Nom.plain_text
Does anyone have any idea what I should do to solve this problem?
Thank you in advance
Hey David,
can you share a screenshot demonstrating what you mean? From the formula it self - it looks like you mapped an item called plain_text form an array called Nom.
Ok but what doesn’t work? Can you show some sample input data to see what you are running this formula on so we can see what might be causing it to fail?
Of course, of course
Here’s what I’ve entered in 1. properties_value.Nom.plain_text :
7 alternatives gratuites à spotify qui respectent votre vie privée
And this is what I got out of it:
7 alternatives gratuites à spotify qui respectent votre vie privée.jpeg
As this is a file name, I need to be able to remove spaces, special and accented characters, etc…
Ah sorry, you need to define your regex inside / /. So for example à|á|â|ä|ã|å needs to be /à|á|â|ä|ã|å/
That would be my only “little” mistake? 
Thanks, I’ll change my script right away
I’m sorry, but it didn’t work.
However, here is the whole function modified as indicated above: