SaveToSharepoint command - InfoPath Dev
in

InfoPath Dev

SaveToSharepoint command

Last post 08-09-2010 10:59 AM by Hilary Stoupa. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 08-05-2010 01:18 PM

    SaveToSharepoint command

    OK - now I am trying to get the bare bones SaveToSharepoint example to work... 

    I don't get any errors, the form opens in browser and I can attach the file, but the Link nor the Filename show on the form and the attachment does not show in the library...  GEEZ!!

     Please HELP!!

  • 08-06-2010 09:39 AM In reply to

    Re: SaveToSharepoint command

    SaveToSharePoint command in your attached form is incorrect - below is the correct syntax. 

    SaveToSharepoint /url=<YOURSHAREPOINT URL> /xpath=/my:myfields/my:attachment

    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 08-06-2010 10:37 AM In reply to

    Re: SaveToSharepoint command

    Cut and pasted your syntax and put in my sharepoint http://fulcoforms.co.fulton.ga.us/Attachment - where "Attachment" is the name of my library.

    It still does not return the two hyperlinks or place the attachment in the library. 

    It should be so simple, I know...  That is why it is driving me crazy!!

  • 08-06-2010 10:54 AM In reply to

    Re: SaveToSharepoint command

    Can you put the "Error" node from the qRules data source on your form so that you can see if qRules is returning any errors?

    Are you trying this in preview mode? If so, you'll need to set your form to full trust just while previewing, since the command will return a permissions error unless published on the same server you are saving the attachments to.

    Hilary Stoupa

  • 08-06-2010 10:58 AM In reply to

    Re: SaveToSharepoint command

    Sorry, the command is case-sensitive. It should be SaveToSharePoint.

    Cut and paste this value for your command:

    SaveToSharePoint /url=http://fulcoforms.co.fulton.ga.us/Attachment /xpath=/my:myfields/my:attachment

    Also, drag and drop the  'Error' node from QdabraRules(Secondary) data source onto your canvas to see a specific error message.

     

     

     

    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 08-06-2010 11:29 AM In reply to

    Re: SaveToSharepoint command

    Is it supposed to say "http:" twice?  It didn't like it, so I took the extra one out.

    I did get an error that says: An error has occurred executing the rule. Error: No nodes were found using the specified XPath.

    I still cannot figure it out!

  • 08-06-2010 11:37 AM In reply to

    Re: SaveToSharepoint command

    replace your xpath parameter value with this:

    /my:myFields/my:Attachment

     

    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 08-06-2010 11:52 AM In reply to

    The Field Name is now "Image"  We started all over and tried building the thing all over again exactly as specified in the instructions.

    Here it is cut and pasted from the function line:  SaveToSharePoint /url=http://fulcoforms.co.fulton.ga.us/Attachment /xpath=/my:myfields/my:Image

    Here is the error message I get in preview - But this is happening because I am not on the sharepoint server, I think.  The form still does not work on the sharepoint site and there are no errors - nothing happens:

    An unexpected error occurred executing the rule. Action: SaveToSharePoint
     Arguments:
    url: http://fulcoforms.co.fulton.ga.us/Attachment
    xpath: /my:myFields/my:Image

     Details: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    Stack:   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
       at System.Security.CodeAccessPermission.Demand()
       at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
       at System.Net.HttpRequestCreator.Create(Uri Uri)
       at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
       at System.Net.WebRequest.Create(String requestUriString)
       at Qdabra.Tools.RulesLibrary.Commands.SaveFileToSharepoint(String& base64Value, String& url)
       at Qdabra.Tools.RulesLibrary.Commands.SaveToSharePoint(String url, String domName, String nodeXPath)
       at Qdabra.Tools.RulesLibrary.Commands.SaveToSharePoint()
       at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand()

  • 08-06-2010 11:55 AM In reply to

    Re: SaveToSharepoint command

    As Hilary mentioned earlier, if you are trying this in preview mode - then set your form to 'Full Trust'.

    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 08-06-2010 11:59 AM In reply to

    Re: SaveToSharepoint command

    That permission error is because of previewing w/out setting the form to full trust. Under Tools / Form Options (IP 2007) you can find security and trust and set the form to full trust temporarily to test the rest of your syntax.

    Hilary Stoupa

  • 08-06-2010 12:34 PM In reply to

    Re: SaveToSharepoint command

    We got it working!!!  Great Celebration!!!

     You ladies were such a big help!!!  We thank you so MUCH!!!!!!

    Now we are going to try to make it work on multiples???  We have a repeating table that accepts attachments and we want them all to show in the library with the saved form.  Is that doable?  If not, just tell me now...  AND be kind!

  • 08-06-2010 12:55 PM In reply to

    Re: SaveToSharepoint command

    Glad it's working!:)

    Yes, you can add multiple attachments at once, just make the 'Attachment' element as a 'Repeating' node, and drag and drop onto your canvas - that's it.

    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 08-09-2010 10:24 AM In reply to

    Re: SaveToSharepoint command

    Now that I have this absolutely awesome function working even in the form I was designing - Yeah!!... Is there any way I can change the way the file (and link) is named when it is saved to the library? I have a control number on the master form - and would like to name my attachments - [control number] A, B, C etc. So the sharepoint library would look like: 1 BOC Agenda Item Request 1A Attachment A Name 1B Attachment B Name 1C Attachment C Name This would keep the attachments with the master document when all is saved. Is that doable?
  • 08-09-2010 10:59 AM In reply to

    Re: SaveToSharepoint command

    Currently the command doesn't allow any user input on the file name.

    Hilary Stoupa

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