Attachments - trying to save to SharePoint - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Attachments - trying to save to SharePoint

Last post 09-22-2011 04:29 AM by ErnestoM. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-14-2011 04:09 AM

    Attachments - trying to save to SharePoint

    Hi,

    I am using infopath 2007 and qrules 3.1.

    I have a form with several attachments (not repeating)

    I want to upload those attachments to a Sharepoint document library as documents, and get the links included in the form.  I do not want to submit the form to sharepoint at this stage.

    I have been trying the SaveToSharePoint command, but get an error.

    Action: SaveToSharePoint. Arguments: url:  http://......./ARK/ARKDocumentsAcceptanceTestInformation
    xpath: /my:myFields/my:Status/my:FutureStrategyFTUGroup/my:FutureStrategyFileGroup/my:File

    . Details: Value does not fall within the expected range.. Stack:    at Microsoft.Office.InfoPath.Internal.ApplicationHost.IsDestinationReachable(String destination)
       at Qdabra.Tools.RulesLibrary.Commands.VerifyUrlIsAccessible(String url)
       at Qdabra.Tools.RulesLibrary.Commands.SaveToSharePoint(String url, String domName, String nodeXPath, String fileName, String overwriteExisting, String copyServiceName)
       at Qdabra.Tools.RulesLibrary.Commands.SaveToSharePoint()
       at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand()

    The attachment is a word document.  I have put the qRulesLink and qRulesFilename attributes on the file. 

    I have full control of the document library I am trying to add to.... I am still testing at the moment so the form has not been published to sharepoint/dbxl yet.

    Could you advise me what else I need to investigarte/check ?

    Also

    I would like to change the name of the file to ensure uniqueness.  Can that be done - while saving?  before saving ?

    Thank you

    Catharine

     

     

  • 09-14-2011 05:36 AM In reply to

    Re: Attachments - trying to save to SharePoint

    Hi Catharine,

    You might want to try publishing the form. It might be that the command is failing because of the hop between your machine (Preview mode) and the SharePoint server. 

    If that doesn't work, try modifying your form security settings. I seem to remember a case where the form needed to be full trust for the command to work.

    But the work around for that (if you don't want the form to be full trust) is to use the dsnamews parameter. This is an undocumented option in qRules, but we should be blogging about it soon. The command will look like this:

    SaveToSharePoint /url=http://servername/Documents/ /xpath=/my:myFields/my:Files/my:File /dsnamews=Upload

    Upload is going to be a receive type data connection to the Copy web service in SharePoint (http://servername/_vti_bin/Copy.asmx?WSDL) with all blank parameters (in the data connection wizard). I'm attaching a screenshot.

    As far as filename uniqueness, the command will take care of that and will generate a unique name, so no need to worry.

    Hope this helps!

     


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


  • 09-16-2011 02:04 AM In reply to

    Re: Attachments - trying to save to SharePoint

    Hi Ernesto,

    Thank you for your reply.

    I have published the form to SharePoint.  I then opened the form (by clicking new), I have then attached my document and tried to do the SaveToSharePoint - the save to sharepoint is done before the form is saved/submitted.  I still get the same error.

    I have made the form full trust and signed it with a certificate, done the same test, and I still get the error.

    I have added the "Upload" data connection as a receive datatype, and re-published and I still get the error.

    Action: SaveToSharePoint. Arguments: url:  http://..../ARK/ARKDocumentsAcceptanceTestInformation
    xpath: /my:myFields/my:Status/my:FutureStrategyFTUGroup/my:FutureStrategyFileGroup/my:File
    dsnamews: Upload
    . Details: Value does not fall within the expected range.. Stack:    at Microsoft.Office.InfoPath.Internal.ApplicationHost.IsDestinationReachable(String destination)
       at Qdabra.Tools.RulesLibrary.Commands.VerifyUrlIsAccessible(String url)
       at Qdabra.Tools.RulesLibrary.Commands.SaveToSharePoint(String url, String domName, String nodeXPath, String fileName, String overwriteExisting, String copyServiceName)
       at Qdabra.Tools.RulesLibrary.Commands.SaveToSharePoint()
       at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand()

    I still have full control of the document library I am trying to Save to.

    Do you have any other ideas?

    Catharine

  • 09-16-2011 04:07 AM In reply to

    Re: Attachments - trying to save to SharePoint

    No ideas come to mind, but maybe taking a look at the form will help. Can you send it via email?

    Thanks.

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


  • 09-22-2011 04:29 AM In reply to

    Re: Attachments - trying to save to SharePoint

     This was solved. There were some extra, sneaky spaces in the command.

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


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