Displaying form data sent to SQL Server in Sharepoint form list

S

Steve D

I have created an Infopath form that submits the data to a SQL database. I
have also published this for to a Sharepoint site. The submitted data is in
the Sql database but cannot be seen on the Sharepoint site. The form launchs
and functions correctly from Sharepoint but the submitted data is not seen
there. What am I missing?

Thanks,
Steve
 
S

Steve D

Update: The only way I can get the data to display on the Sharepoint site is
to have Submit leave the form open. When I close the form I am prompted to
save. If I save with a fifferent name it then displays on Sharepoint. I want
this all to happen automatically which I assumed it could.

Steve D
 
S

Scott L. Heim [MSFT]

Hi Steve,

When you say the submitted data is not there - you are referring to the
"form" itself with the data - correct?

Is this is what you mean, here is what you will need to do:

- Create a new "Submit" data connection to your Sharepoint library
- Add a button to your form
- Right-click on the button and choose Properties
- Click the Rules button
- Click Add
- Click Add Action
- From the Action box choose "Submit using a data connection" and select
your SQL connection
- Add another action as above but this time choose your Sharepoint
connection

You will now use this button to execute your "submits" and the Rules you
just added will first submit the data to SQL and then the form to
Sharepoint.

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steve D

Hi Scott,

The data submits into the SQL database but will not show in the form library
for this form. When I published the form to the site I selected to display
the columns and that worked fine but when the form is submitted the data does
not populate those columns and the form does not display on the site form
library page for that form. I do not see an option to define both submit to
database and submit to Sharepoint site in the properties box for the button.
Nor is there a button in the properties that says Add Rule.

Thanks,
Steve
 
S

Scott L. Heim [MSFT]

Hi Steve,

You would need to create the additional "submit" connection:

- Open your form in Design View
- From the Tools menu choose: Data Connections
- Click Add
- Select: Submit Data and then complete the wizard to create a new
connection to your Sharepoint site

Once this is done, in order to submit to 2 locations in one step you will
need to add a button to your form as you cannot use the "built-in" Submit
functionality.

- Add a new button to your form
- Right-click on the button and choose Properties
- Click the Rules button
- Click Add
- Click Add Action
- From the Action box choose: Submit using a data connection
- From the Data Connection box choose your SQL Server data connection and
click OK
- Click Add Action
- From the Action box choose: Submit using a data connection
- From the Data Connection box choose your new Sharepoint data connection
and click OK
- Click OK 3 times to get back to your form
- Test

When you click your new button, the data should be sent to your SQL Server
and the form sent to your Sharepoint site!

If you want to now remove the default "Submit" functionality so users do
not use this by mistake, complete these steps:

- Open your form in Design View
- From the Tools menu choose: Submitting Forms
- Uncheck the option: "Enable the Submit menu item on the File menu"

I hope these steps help!

Best regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steve D

Hi Scott,

I didn't realize it but Office SP1 enhances Infopath to give me what you
have been describing. It makes a world of difference. I have now installed
SP1 and will try your suggestions.

Thanks,
Steve
 
S

Scott L. Heim [MSFT]

My apologies Steve as I simply made the assumption you had SP1. You are
correct - SP1 is a wonderful upgrade.

I look forward to hearing your results!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steve D

I got the connections working fine now that I have installed SP! but newly
submitted data overwites the previous form data in the Sharepoint library
because it is being submitted as the same file name . Is there a simple way
to have the new form data saved to list without overwriting the previous
entry?

Thanks,
Steve
 
S

Scott L. Heim [MSFT]

Hi Steve,

That's great to hear!

If you recall, when you went through setting up your "submit" connection,
on one of the screens there was an option for the form name. By default,
this is "Form1" and when you enable the option to allow it to overwrite,
then each time you submit the form it gets submitted as "Form1" and simply
overwrites what is there.

What you will need to do is modify your connection (Tools->Data
Connections) and on the screen where Form1 is the name, you can click the
button next to this and point it to a field on your form. As an example,
maybe the user will be entering a customer ID, name, etc. that would
uniquely identify this form - this is what you are looking for: a field
that uniquely identifies each form. If the user will not be entering this
information then you will need to do something to make a field unique (i.e.
the current date/time, user name along with the date, etc.)

Let me know if you have any other questions!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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