Skip to main content
Does anyone know how to get the filename of a document in a document library that was uploaded with a document activity? Preferably get the filename and be able to pull that information in to InfoPath using a formula or something.
Just a question here.  Given that you should have specified the path values to have uploaded the document via the event template.  Wouldn't you already have the path already?
It is being uploaded from a K2 Field. When using a K2 field upload you don't have the option under "File Attachment" to set a Filename in the Filename Node. If you change it to picture, you then have the ability, but I don't know how that would affect the form or process. The file(s) are in InfoPath to begin with on the initial process. The files are too big to keep in InfoPath. So they are uploaded after the first submission and then IPC switches to a different process. From there I need to be able to link to the document so they can be opened from the InfoPath form as a hyperlink. In order to do that instead of just sending the users to the library itself, I would need the filename.

Here is what you need...  you set a K2 field (or infopath field) with the filename once you've retrieved the filename from the file upload control on your infopath form.


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


It's been written using InfoPath 2003 DOM, but it's easily translated into 2007


Martin


P.S. not sure how this code would work for web-enabled infopath forms, and you'll need to configure your InfoPath form code behind to be c#.... this may mean you need to recreate your form as you cannot change it once you've started using JScript or VB.NET etc etc.


 


Reply