How is it possible to cut off the file extension from a name.
What we are willing to do is the following:
User creates a docx file and will be converted to a pdf.
In the approval screen (nintex forms) we want to show the pdf instead of the docx with the pageviewer.
to do this, we need to put in a variable the documentname.pdf instead of documentname.docx
Solved! Go to Solution.
If the filename always has .docx in the end, then it is very simple.
Configure the Regular Expression action with the Pattern ".docx", Operation to Replace text, set the replacement text to "", have the input text as the filename(by reference), and store the result in a single line of text variable.
The result here will be "filename".
If the file extension is not always .docx, then you will need to replace the pattern with a regex that looks for the final dot and anything after it to make a match.
I've found that the pattern
will find the filename every time. So using this function with operation "Extract" and saving to a collection.
so "fil en.ame.docx" will result in file en.ame;
and "file.name.docx" will result in file.name
and "file.name.txt" will result in file.name