Create Expression to get doc type
+3
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.
+3
Thank you, Mustafa, that did work!
+3
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.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.