Skip to main content
Nintex Community Menu Bar

Some it's needed to cut the file extension from a file name.

Here are 2 steps to do it.

We 'll use the actions named:

  • Regular Expression
  • Get Item From Collection
  • Log To History List ( to show results )

 

 

182444_pastedImage_3.png

 

Used Variables

     Use the following variables for this sample

 

182445_pastedImage_5.png

 

Action 1 - Regular Expression Action Configuration

 

Set the String attribute with your filename. In my sample I am getting it from a Sharepoint Column name named "ItemwithExtension"

Then set the String operation to "Extract"

 

The pattern used is :^/]*(?=."^.]+($|?)) with ignore case checked

Finally set a collection variable ( varWithout2 in this case ) to get the results

Finally set a collection variable ( varWithout2 in this cae) to get the results

 

182446_pastedImage_6.png

 

 

Action 2 - Get Item From Collection

 

This action is set to extract he first value from the collection variable (varWithout2) and set the result on the variable named varWithoutExtension

 

 

182447_pastedImage_10.png

 

 

Action 3 - Log To History List

 

In my sample I wanted to view the results on the History list from a string with the value fhunth.photo.jpg and the results showed is fhunth.photo

182448_pastedImage_11.png

 

 

The result

 

182443_pastedImage_0.png

Hi, I'm trying to do this exact process with the On Premis version of Nintex.

However, when I attempt my Collection Operation to extract the first value (Action 2 above), I have no "Index" available from the dropdown

Capture.JPG

How do I do this or what am I doing wrong?

Thanks


Unfortunately you can't type in the index field, you will have to create a numeric variable with a default value and use that.


Thank you! this worked perfectly

I found I also needed to run a Collection Operation to sort the collection variable (ascending)

This then allowed me to use the numeric variable in the screenshot above (default value = 1) to select the correct value.

Thank you!


Reply