Retrieve document URL for uploaded document in MOSS 2007

  • 16 January 2008
  • 4 replies
  • 1 view

Badge +2

I am designing a process to upload the attached document in InfoPath into MOSS for approval. Requirement is to upload the document into MOSS and in approval form show this URL for the users to view the document.   


 


Person starts the workflow by filling up InfoPath 2007 form and uploads the document as attached document. Inside the K2 I am uploading the attached document in InfoPath into MOSS. I do not know how to retrieve the URL for uploaded document.


 


I am using SpsList.UploadDocument.


 


Please can someone throw some light how to do this?


 


Thanks,


Srini 


 


4 replies

Badge +9
Just a question here.  If you are uploading the document into MOSS.  Doesn't this mean you need to specify a certain file path (determined by yourself) when uploading?  Wouldn't you be able to store this into a process data field?
Badge +2

Thanks for replying 


Correct I will know URL to the library not the file that I am uploading. My requirement is to upload the file and get the URL to the file. This URL will be shown to the user. So when he clicks the URL, the uploaded file will be shown in the browser. The library will hold multiple files so I want the URL for the uploaded file.


Thanks,Srini

Badge +2

I am able to form the URL by concatenating the library URL and file name. If I click on the concatenated URL, I am able to open the file in the browser. This will solve my problem.


 

Badge +9

Just as an FYI, the document URL can be formed from these two fields within the SharePoint context XML fields.



  1. Select Site URL under XML Fields > Process1 > SPIntegrationData > SPData
  2. Append a "/" (forward slash) after the field just added
  3. Append ItemURL under XML Fields > Process1 > SPIntegrationData > SPData

This will give the full URL path to the document item.

Reply