savetosharepoint /name not quite working - InfoPath Dev
in

InfoPath Dev

savetosharepoint /name not quite working

Last post 11-06-2012 09:01 AM by triciadsyoung. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 08-07-2012 01:16 PM

    savetosharepoint /name not quite working

    Hello All,

    I'm using the savetosharepoint command and want to change the name from the standard name that has "###########################_AttachmentName.<suffix>" to something different.  I would like to name file the same name as the form being saved to sharepoint + the AttachmentName.<suffix> | ie; FileName-AttachmentName.<suffix>

    Here's what I tried...

    concat("SaveToSharePoint /url=https://sharepoint.company.com/departments/legal/contractmgmt/Contract%20Documents /xpath=/my:myFields/my:Attachment2 /name=", strFilename, "-", @qRulesFilename) 

    I then ran the form and attached two files.  My output was:

    Filename-    <FileName being the name of the saved form name>

    So it was close, I got the FileName part but not the "-AttachmentName.<suffix>" & I only got one of the attached files saved in the SharePoint library. Is there something I am missing to make this work correctly?

    I also wanted to send a copy of the form with the attachments via email, which I did before Injecting qRules.  After I injected qRules the attachments were gone (which I expected) but I was hoping that the links to the files would be in place of the attachments which they were not.  Is there a switch I need to use to have the emailed form show the links to the attachments?

    Thanks for your help,

    -Bob

  • 08-07-2012 02:06 PM In reply to

    Re: savetosharepoint /name not quite working

    Hi - is Attachment2 repeating? I'm also confused by the use of the qRulesFilename attribute for the name fo the attachment - won't that be blank until after qRules submits the file and returns the filename?

    Hilary Stoupa

  • 08-07-2012 02:09 PM In reply to

    Re: savetosharepoint /name not quite working

    Hi Bob,

    The qRulesFilename attribute is actually blank until the image/attachment is uploaded. When uploaded, then the qRulesFilename attribute receives a name, in this case, the /name that you are defining. So I think the result you are seeing is to be expected. I'm not sure if there's an easy way to get back the attachment's filename... qRules does that via code, I believe.

    As far as showing the links to the images, that's totally possible, and you can handle that via form logic. Basically, you need to ensure that in the email that is sent out the attachment field is not displayed (since it will be blank) and in its place you show the qRulesLink attribute, which will contain the link. You could also add a Hyperlink and point it to the qRulesLink for the URL.

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


  • 08-07-2012 02:33 PM In reply to

    Re: savetosharepoint /name not quite working

    ahh.. yes.. bummer, that's right, I don't get the Attachment Name until after the submission... no way to do that then? (append the AttachmentName to the name of the custom File Name)

    Doh!... easy fix for the links... thanks.

    -Bob

  • 08-07-2012 03:12 PM In reply to

    Re: savetosharepoint /name not quite working

    Hi again....

    So I setup the data connection to email me and now I see this message...

    Infopath cannot open the following file <path/file.xml>.  The form template is trying to access files and settings on your computer.  InfoPath cannot grant access to these files and settings because the form template is not fully trusted.  for a form to run with full trust, it must be installed or digitally signed with a certificate.

    I do have the form security set at full trust and admin installed it.

    perhaps the way I sent the message via email (as attachment).  I'll test, but if someone knows why this message popped up, that would be nice to know.

    Thanks,

    -B

  • 08-07-2012 03:30 PM In reply to

    Re: savetosharepoint /name not quite working

    You can get the attachment name prior to that - use the GetAttachmentAttribute command.

    Hilary Stoupa

  • 08-07-2012 03:31 PM In reply to

    Re: savetosharepoint /name not quite working

    Oh, I should add - just check the processing instructions in the XML that you sent via email - where is the XML expecting to find the template?

    Hilary Stoupa

  • 08-07-2012 04:02 PM In reply to

    Re: savetosharepoint /name not quite working

    I changed the way the form was being sent in email from attached to imbedded and it worked fine, although it streches the form horizontally in the outlook client (odd).

    My one last question for this small endeavor is that I now have the links showing in the emailed form, but they are not clickable.  I can copy and paste the string into the browser address field and that works, but coping and pasting URL's will not fly with the users.  How do I make the links clickable?

    Thanks,

    -B

  • 08-07-2012 04:10 PM In reply to

    Re: savetosharepoint /name not quite working

    ... nvermind...

    used the link . 

    Thanks for all your help!

  • 11-06-2012 09:01 AM In reply to

    Re: savetosharepoint /name not quite working

    Hello everyone.  How did you program or setup your Infopath form to send a copy of the form with the attachments via email?  I need this solution for my project.  Also, I don't see in this thread where you received a response to your multiple attachments save to SharePoint question.  I am running into the same problem.  If your form is working as intended are you able to provide me with a copy of your form or a run down of how you got it to work?

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