How to change filename?

  • 13 February 2013
  • 2 replies
  • 8 views

Badge +4

Hi All,


I loaded a doc file to document library through K2 process using SharePoint Document event. (K2 blackpearl version 4.5.3). It did not allow me to change file name.


Then I want to change the file name after uploading. How to do that?


Thanks,


David


2 replies

Badge +8

If you can upgrade to the latest version, a new SharePoint Service Instance has been introduced (in  4.6.2 I think) leveraging the SharePoint CSOM interface. This has an option to rename document. 

Badge +4

I figured out a workaround.


0, Add a binary element field for file attachment on InfoPath form. We call it "Orignal File". 


1. Add a binary element field to InfoPath form. We call it "Published file".


2.In workflow, add a data event, select transfer data


3.at assigning data, select "Published field" field as destination


4.go to funcion browers, select Set Attachment inline function under InfoPath category


5. Put your own name or from InfoPath form field as FileName


6. in Content field, select "Get Attachment Content" in line function (form same place of Set Attachment)


7.in "Get Attachment Content" function , Attachment field, select the attachment field name ("Orginal File" field) on your infoPath form.


8, Click Finish, all the way back.


9. Use "SharePoint Document" event to upload document using "From  K2 Field", select "Published File" field.


 


 

Reply