HOW TO:  Execute CreateFolder method

Posted on 2011-10-27
Last Modified: 2012-08-14
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?
Question by:kbtudor
    LVL 14

    Expert Comment


    Author Comment

    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.
    LVL 14

    Expert Comment

    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.


    Accepted Solution

    I found an article that answered my questions here:

    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!

    Author Closing Comment

    Self-solved.  But thanks very much for the input - that got me headed in the right direction!

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Suggested Solutions

    Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
    Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
    This video discusses moving either the default database or any database to a new volume.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now