Skip to main content

I've managed to upload the document to a sharepoint document library retrieving the attachment as a K2 field, and this works a treat, however, I don't know the filename of the document i've just uploaded... or do I.


Most of the infopath forums suggest writing code to decode the unicode attachment to retrieve the filename, I was wondering if this was possible in K2 before I go hacking code behind InfoPath


Martin

if anyone is interested I managed to get around this issue by adding some code behind the infopath form to decode the attachment to get the filename.


I can post the code here if anyone wants it


Martin


Post it!  I'm sure others will find it useful.  Though I have to ask, when you uploaded the document to SharePoint, didn't you get to specify the file name right then and there?

Hi Tim


Yes I get what you are saying.... you do specify the file there and then, but if you need to work with the filename later in the workflow, you have to decode the attachment either in Infopath (which is how I did it) or inside K2 (at a guess, I havent actually done this).


I've posted the code on my blog:


http://blog.mgallen.com/?p=94


Hope this is useful


Martin


Reply