SaveToSharePoint Dynamic URL? - InfoPath Dev
in

InfoPath Dev

SaveToSharePoint Dynamic URL?

Last post 12-02-2010 09:45 AM by Jimmy. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 11-24-2010 11:48 AM

    SaveToSharePoint Dynamic URL?

    Hello - Is it possible to have the SaveToSharePoint command point to a dynamic URL based on the information contained in the form? 

    Filed under:
  • 11-24-2010 02:35 PM In reply to

    Re: SaveToSharePoint Dynamic URL?

    Yes, it is theoretically possible to use the command this way. Let us know if you run into issues!
    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 11-30-2010 08:28 AM In reply to

    Re: SaveToSharePoint Dynamic URL?

     What would be the best way to accomplish this through AttachToSharePointList or SaveToSharePoint? Can you provide an example of what that function would look like?

  • 11-30-2010 08:40 AM In reply to

    Re: SaveToSharePoint Dynamic URL?

    Hi -- AttachToSharePointList adds an attachment to an existing list item. SaveToSharePoint submits a file to a library. Which command you use would depend on what you are trying to achieve.

    Can you tell me more about what you mean when you say "a dynamic URL based on the information contained in the form"? Is the URL used contained in a form field? Or do you want rule logic based on a field (i.e. Department = HR, save to one library, else another)?

    Hilary Stoupa

  • 11-30-2010 08:45 AM In reply to

    Re: SaveToSharePoint Dynamic URL?

     Thanks for the quick response. From the description above it looks like the SaveToSharePoint is what I would need. The form I have is a content type that is used on multiple project sites. The form will have multiple attachments that need to be submitted to that specific projects document library. I do have the URL to the project site is contained in the data source so if I could use that that would work.

  • 11-30-2010 12:38 PM In reply to

    Re: SaveToSharePoint Dynamic URL?

    So, you could use a concat formula to create your SaveToSharePoint command. Instead of typing the command into the value box when creating the rule to set the Command node, you'd use a formula:

    concat("SaveToSharePoint /url=", urlfield,"LibraryName "/xpath=<XPath To Attachment>")

    where you use Insert field or group to insert the field (with any filters) that contains your URL where it says urlfield above, the words LibraryName with the name of your library, and you replace <XPath To Attachment> with the actual XPath to your attachment.....

    Hilary Stoupa

  • 12-02-2010 09:31 AM In reply to

    Re: SaveToSharePoint Dynamic URL?

     I am getting the error:

     An error has occurred executing the rule. Required parameter unspecified: xpath
    Usage is:


    SaveToSharePoint
            /url=SharePoint Library URL
            [/dsname=Data Source Name]
            /xpath=XPath to Picture(s) or Attachment(s)[/dsnamews=Data Connection Name for Copy web service]

    Below is  the formula I am using:

    concat("SaveToSharePoint /url=", @ProjectSiteUrl, "/Shared Documents", " /xpath = /my:myFields/my:Attach", " /dsname = Main Connection")

     

    Also, If I try to use a non dynamic formula for testing (SaveToSharePoint /url=http://intranet.dci.com/eng/apd/project /xpath=/my:myFields/my:Attach) I get the error: 

    Expected value type: end-of-string

    Actual value: :
    SaveToSharePoint /url=http-->:<--//intranet.dci.com/eng/apd/project /xpath=/my:myFields/my:Attach

     

  • 12-02-2010 09:39 AM In reply to

    Re: SaveToSharePoint Dynamic URL?

    You are using the main data souce, so do not need to specify a /dsname. What does the url from your 2DS look like? Does it have a trailing "/" already? Try pasting your concat formula into a dialog box expression, so that IP will pop up a message box in preview that shows you the formula after the concat has run.

    The error you are getting when you use a non dynamic formula -- were you simply entering the string into the formula editor window instead of the "value" field for the rule?

    Hilary Stoupa

  • 12-02-2010 09:45 AM In reply to

    Re: SaveToSharePoint Dynamic URL?

    For your dynamic formula, try removing the spaces before and after the equals sign.  That's most likely the issue.

    For a non-dynamic formula, you need to either enclose the whole command in quotes:

    "SaveToSharePoint /url=http://intranet.dci.com/eng/apd/project /xpath=/my:myFields/my:Attach"

    or enter the command in the Value box without going into the formula editor

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.