Adding attachments to form and storing them in a SP library? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Adding attachments to form and storing them in a SP library?

Last post 10-10-2007 04:42 AM by adamrharding. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 10-10-2007 02:11 AM

    Adding attachments to form and storing them in a SP library?

    I did do some searching of the forum on this and ended up a little confused. I am very new to InfoPath and XML, I have just set myself up a form library in sharepoint and made the template browser enabled, and added some fields, got them going into columns in the library etc.

    I want to know how you can allow the user to add an attachment (presumably using the file attachment control) but then store this attachment in a library on sharepoint- I am guessing you cannot directly add the attachment to the form- but I basically need somewhere to store that attachment with the same name as the form (so It can be found easily) and so that users can view it.

    I hope that made some sense. Basically, user attaches file to form, then when they submit the form, form gets stored in its own library and attachment goes into another (with the same name as the form is saved as- i currently save the form as PO & the contents of a field orderNo on the form to uniquely identify it).

     Any ideas? I am pretty new to this :-)

    Thanks

    Stef

  • 10-10-2007 03:44 AM In reply to

    Re: Adding attachments to form and storing them in a SP library?

    Hi

    The simplest solution would be to place a button on your form that opens up a save dialogue box defaulted to a suitable SharePoint library with a suitable title.

    Search the Code forum for examples of code to force save.

    Cheers

    Adam

     

    Adam Harding
    Wales
    UK
  • 10-10-2007 03:50 AM In reply to

    Re: Adding attachments to form and storing them in a SP library?

    Wouldn't that just save the form though and not the attachment? I already have the form saving somewhere OK but want to save the attachment somewhere else.. perhaps I've misunderstood you?! ;)

    Thanks

  • 10-10-2007 04:13 AM In reply to

    Re: Adding attachments to form and storing them in a SP library?

    Hi

    Ok, maybe i should have bee nmore clear.  You have a file attachment control on the form that does not bind to SharePoint only to the form itself, then have a button on the form that save as' the attachment, through code.

    Would work fine

    Cheers

    Adam Harding
    Wales
    UK
  • 10-10-2007 04:26 AM In reply to

    Re: Adding attachments to form and storing them in a SP library?

    So I would have the normal submit to save the form then an extra button to save the attachment? Does that mean you'd have to attach, then save it, then submit the form.. I had a look at the file attachment control and cant see anything about saving.

    Is there no way to just have the normal submit and then take the attachment and save it elsewhere to the form?

    Sorry for the rather stupid q's, youve probably guessed just how limited my knowledge is now.. thanks for being patient.

     

  • 10-10-2007 04:42 AM In reply to

    Re: Adding attachments to form and storing them in a SP library?

    Sorry me being stupid, there is a better way

    Add the file attachment control to the form and create a web service that "saves" the form in the correct document library.  I am no expert my self on writing web services but post your question in the Web Services forum and see what comes back.

    I hope this helps

    Cheers

    Adam Harding
    Wales
    UK
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.