• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 395
  • Last Modified:

HOW TO: Execute CreateFolder method

This is above me, so I'm asking for more detailed instructions.  I've created a data connection in my Infopath form to save attached files to a SharePoint library.  It throws an error when there are duplicate file names.  From a blog I read to create a new data connection for the WSD web service, using the CreateFolder option.  I did this successfully.  The blog then states "You can then execute the CreateFolder method.  For the input parameter, basically it is just <document library name>/<your desired folder name>."  The blog is old, so I'm not sure I can contact the author, but will try there as well.  How exactly do I execute the CreateFolder method?
0
kbtudor
Asked:
kbtudor
  • 3
  • 2
1 Solution
 
abhitrigCommented:
0
 
kbtudorAuthor Commented:
Thanks, but I'm looking for a solution from InfoPath, not code writing.  I'm thinking I need to create a rule that assigns a folder name to the CreateFolder data query?  This is where I'm stuck.
0
 
abhitrigCommented:
Try creating the complete batch xml (as shown in the link) along with the folder name on your rule and then call the webservice passing the complete xml.
The XML will be static (except for the foldername) that you can then pass to the webservice.

0
 
kbtudorAuthor Commented:
I found an article that answered my questions here:  http://www.symantec.com/connect/forums/dynamically-creating-folders-sharepoint

What I missed is that the CreateFolder data connection must point to the sub-site and not the root.  Once I did that, I could create folders dynamically with no problems.

One last point in case someone else has this issue - to give the folder individual names, create a recieve data connection to your SharePoint library with just the ID selected.  Then create a form field and set a rule to make it's value the max(@ID) of the list or library.  Append that to your folder name and you have a unique name!
0
 
kbtudorAuthor Commented:
Self-solved.  But thanks very much for the input - that got me headed in the right direction!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now