submit to a SQL database & a sharepoint library with 1 button?

N

Nick Monsour

HELP_HELP_HELP_HELP_HELP_HELP_HELP_HELP_HELP_HELP_HELP_HELP_HELP!!!
Help please.
I am using InfoPath with the service pack and publishing it to a
SharePoint library. My form is using a SQL database for its data
source. I need some how to enable a button to submit the data captured
in the form to the SQL table I created (I have this working) and have
it saved to the Sharepoint library as well. I have seen some of the
articles but I do not understand how to make this happen. I seem to be
able to do either but not both. I can't use 2 buttons as this would
be unacceptable to the users. Can anyone please tell me how to make
this happen, please? And please be very explicit as most of the answers
I have read do not seem to connect all of the steps involved.
Thanks
Nick
 
B

Ben

you can assign multiple rules to a button so you could have one rule that
submits to the form library then another rule that submits to your sql table
(data connections required for both). This would only work with a button
control. I am sure you could do it with custom submit code if you just
wanted to enable submitting forms but that is beyond me.
 
N

Nick Monsour

Ben,
I looked at what you mentioned but in the rules and custom submit
section there is a place to do the SharePoint submit but not the SQL
submit. And if you change it to the 'submit' you can't add the
SharePoint library submit.

Thanks anyway hopefully someone from Microsoft will pick this up and
give me (a non developer) a good step by step solution.

Nick
 
B

Brian Teutsch [MSFT]

Don't use the Submit button type, but Ben is correct. Create your SQL and
SharePoint data connections sepearately. Then use the Button's Custom
property, and create two rules. One which submits to each of the data
sources you've already set up.

Brian
 
N

Nick Monsour

Thank you Brian for your quick response, however you are making the
assumption that I know how to create these data connections and if they
differ from the one that I use to create the form in the first place.
And I am not sure about creating the rules but I will look at what
resources I have and work on this solution.

Thanks again.
Nick
 
B

Ben

Hi Nick,
to submit to your sql database you have to create a webservice which
InfoPath can call. Can't help you with that unfortunately but once you
figure out how to create the webservice then you just go into InfoPath then
Tools|Data Connections|Add|Submit|Web Service. Then repeat to create a data
connection to your sharepoint library.
 
S

Steve Mathieu

Hi Nick,
What i suggest to you is to use Sharepoint Event to execute all other
actions you need to execute. You can react to a multiple of events and
centralize your workflow with this solution.

So, continue to submit your information to SharePoint. On the add or update
event , grab the event using the event handler and send your data to the
database.

You can get the event handler toolkit at this location
http://www.microsoft.com/downloads/...1B-D74A-482A-903A-45BB44C5DEC4&displaylang=en

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top