tschaef
Nintex Newbie

Create Expression to get doc type

Jump to solution
I need to get and use the doc type from attachments on my smartform. For example if the attachment's file name is "Test File.doc" I need to have ".doc" pulled back to use in another expression. I was hoping to be able to use an expression to do this. I can't use "right" and "3" because some files could end with four letters. In Nintex our group used "(?:[^/]*)$(?<=..*)" to get this data. Any help is greatly appreciated.
0 Kudos
Reply
3 Replies
Mustafa1
Nintex Newbie

Re: Create Expression to get doc type

Jump to solution

Hi,

 

I managed to get the extension.

 

 

 add the following expression

 

2655i2A996C0CD691054B.png

 

 

wish this helps

View solution in original post

Reply
tschaef
Nintex Newbie

Re: Create Expression to get doc type

Jump to solution
Thank you, Mustafa, that did work!
0 Kudos
Reply
tschaef
Nintex Newbie

Re: Create Expression to get doc type

Jump to solution

Just in case anyone has this same issue, I'm adding some changes I had to make for finding the doc type. We have users who attach files with periods in the file names (ex. product name version 1.0 business case.docx). Using the previous solution would pull the 0 and %20 as the doc type. To fix this I added another hidden data label and added an expression (expLast4) to pull the last four characters [Right (File Name, 4)] and I changed the hdnDocType data label expression to replace the period (in case it was a doc type with only 3 characters) [Replace (expLast4, . , (Empty String)) and this resolved the issue.

0 Kudos
Reply