Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2006

Tip: Looking for answers? Try searching our database.

Working with Repeating Tables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Serhan.Saral@gmail.com - 30 Dec 2005 16:18 GMT
Hi Guys,

I'm new to Infopath and I'm trying to create a repeating table to hold
Revision History data for a document and link that to an SQL database.
I was able to link other text boxes to my SQL data source, but can't
get the repeating table to work with my SQL tables.

My SQL table for Revision History is a called SME9_RevHist, with the
following columns:

S90Key is the Primary Key for the table
S91Ver is for the version number
S92VerDate is for the Date the version was updated
S93Auth is for the Author name who made the version update
S94Comm is for Additional comments

Next I created a repeating group called RevInfo with the following
elements:
Ver
VerDate
Auth
Comm

So, how can I now connect the elements in the repeating group the my
SQL table and be able to store and retrive information typed into these
fields when using the form or do I need to go down a different path...

thanks, a bunch
ssaral
Larry Spencer - 30 Dec 2005 22:11 GMT
First, let's make sure your Data Source is set up correctly.  Here's
one way to do it.  (I'll assume you have Service Pack 1.  I don't know
if the interface would differ without it.)

1) Design a new form / New from Data Connection to invoke the wizard.
The following steps are all within the wizard.
2) Choose the Select Database radio button (not Web Service).
3) Select the database.
4) Select your main (parent) table.
5) Press Add Table, then pick the child table (SME9_RevHist).
6) The Edit Relationship dialog appears.  Specify the relationship
between the two tables, if it's not there already.  (InfoPath will
infer a relationship based on foreign-key constraints if you have
them.)
7) The final screen of the Data Connection Wizard will let you name the
data connection.  Pick a name then press Finish.

The Data Source area of InfoPath should now show your tables, with the
RevHist table as a repeating group of the main table.

>From here, you have two choices:

1) If you want to show more than one document (parent-level record) at
a time, the Master/Detail control available in SP1 is the perfect
choice.  Just drag the Group for the parent table to the results
section of the surface and InfoPath will create something to get you
started.  Howver, you'll see that it puts every detail field in twice,
giving you a choice of locations.  You'll probably want to delete one
or the other.  You'll also want to format everything nicely by putting
the fields in Layout tables.  But, as I said, InfoPath will set up a
basic and sound structure to start you off.

2) If you only want one parent record, but potentially many RevHist
records, create the parent controls in the normal way (it sounds like
you have already done this), then drag the Repeating Group for RevHist
from the Data Source to the design surface.  InfoPath will pop up a
menu that gives you a choice of several formats.  Your situation sounds
like a Repeating Table would be the best.  InfoPath will automatically
create a suitable control for each field that's linked to your SQL
Server table.

You'll also need to create the fields in which the user enters query
criteria.  You didn't mention any problems with that, so I assume that
part is good to go.

Now preview your form.  Assuming you have no connectivity issues with
SQL Server, everything should work like magic!

Post again if you have any troubles, and I'll see if I can help.
Serhan.Saral@gmail.com - 03 Jan 2006 15:07 GMT
Thanks Larry I will try your suggestions and post back...
Serhan.Saral@gmail.com - 04 Jan 2006 17:23 GMT
Yes, I'm using InfoPath with SP1, but had some issues creating the
data sources as you described. When I was adding tables to a data
source InfoPath always sets up the first table I added as a repeating
group and then when I tried to select another table using the Add Table
button that table was never setup as a repeating group.

I was able to fix this by identifying several columns in the RevHist
table as Key Columns to create unique entires. Everything seems to be
working now thanks for the help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.