SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet? - InfoPath Dev
in

InfoPath Dev

SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet?

Last post 09-29-2011 07:51 AM by Hilary Stoupa. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-27-2011 06:33 PM

    SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet?

    Greetings -

    Thank you so much for your Forum and qRules. I am curious if there is a way to create folders in a document library based on a value in Main Datasource.

    Regards, Scott
  • 09-28-2011 06:15 AM In reply to

    Re: SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet?

     Hi Scott,

    There probably is a way using SharePoint web services. I realize you are asking this in the context of qRules and the SaveToSharePoint command, but unfortunately qRules does not have a command to support folder creation in SharePoint.

    If you can get the folders created using SharePoint, then it should be easy to point the SaveToSharepoint command to the new folders. Good luck!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-28-2011 07:58 AM In reply to

    Re: SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet?

    Yup, SharePoint web services - namely, Dws.CreateFolder. We've used this before in solutions. It takes a single parameter of url - the format is Library/Foldername, and Library needs to exist on the same site as your data connection points to. So, if your data connection is to http://server/site/_vti_bin/Dws.asmx, your URL would be LibraryOnSite/Foldername. The returned esult will be blank if the folder is successfully created, so you can build some logic on that.

    Hilary Stoupa

  • 09-28-2011 08:21 AM In reply to

    Re: SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet?

    Thank you Hilary!

    So what happens if the folder already exists?
  • 09-28-2011 08:28 AM In reply to

    Re: SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet?

    I don't recall exactly - I think there is a message in the Results node of some kind, but so you know, the folder doesn't get created again, or overwritten, or anything nutty like that - drag the data source onto your form, add a button to query it, and do some experimenting with different values in the query parameter (url) field - You should be able to find a pattern you can hang some logic on.

    Hilary Stoupa

  • 09-29-2011 12:45 AM In reply to

    Re: SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet?

    Thank you Hilary! That was soooooooo easy!!!! For a change :-) - Once I get my deliverable completed I will provide a more detailed summary of what was implemented for anyone else looking to accomplish this with qRules.

    Thank you!

    Scott
  • 09-29-2011 07:51 AM In reply to

    Re: SaveToSharePoint qRule - How do you save the attachment to a folder that doesn't exist yet?

    You bet - isn't it great when something just works?

    Hilary Stoupa

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.