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 / April 2006

Tip: Looking for answers? Try searching our database.

Insert in repeating table is inserting new row in every repeating

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LaurieAPMarsh - 13 Apr 2006 13:01 GMT
I have an InfoPath form connected to a database.  There are several tables
into which the form feeds data.  Each table has a common key so they are all
in the main connection.  There is a drop-down list at the top of the form for
the user to select the appropriate key.  When this is done, all the tables on
the form are populated with the corresponding data in the database.  

If none of the tables have any data and I insert a new row in one of them, a
new row is automatically added to every table.  This causes the user to have
to go delete the rows in the other table before submitting the form due to
required fields in those tables.  

How can I stop InfoPath from inserting a new row in every table?  Keep in
mind this only occurs when none of the tables have any data to begin with.
Adam Harding - 13 Apr 2006 14:45 GMT
Laurie

I believe the datasource(database) is forcing the form to do this as all the
repeating tables are linked on the same key in the master.

By repeating one table you are creating in the database identical entries
for the master key forcing the other tables to do the same to match up.  For
example,

Master.ID is repeated for Table1 meaning that Master.ID is repeated for
tables two and three.

What you need is to have a different table for each repeating table of which
ALL link back to the same master key in the master table.  Then each one can
repeat as many times as it likes, independantly of the others.  For example,

Master.ID links to Table1.Number on a one to many relationship
Master.ID links to Table2.Number on a one to many relationship
Master.ID links to Table3.Number on a one to many relationship

Hence each time you insert a row for table1 NO ROWS GET ADDED for the other
tables.  The same will apply for the others.

Hope this helps

Cheers Adam

> I have an InfoPath form connected to a database.  There are several tables
> into which the form feeds data.  Each table has a common key so they are all
[quoted text clipped - 9 lines]
> How can I stop InfoPath from inserting a new row in every table?  Keep in
> mind this only occurs when none of the tables have any data to begin with.
LaurieAPMarsh - 13 Apr 2006 15:44 GMT
Adam,
The database already has separate tables.  As an example, there is a Table A
of Employees each of which has a key.  Table B is a list of attributes with a
link to the Employee key.  Table C is a list of other attributes again with a
link to the Employee key.  

My form includes a repeating table for Table B and another repeating table
for Table C.  There is a drop-down query list for the selection of the
employee key.  When an entry is selected in the drop-down list, the query is
executed and the Table B and Table C are updated with the corresponding
attributes for that employee.  

In addition, the InfoPath repeating tables for Table B and Table C have a
filter applied so only the "active" attributes are displayed.  

What is strange is that if there is one item in either table already,
inserting a new row doesn't effect the other table.  It only happens when
there is nothing in both repeating tables.  

Any suggestions?

> Laurie
>
[quoted text clipped - 36 lines]
> > How can I stop InfoPath from inserting a new row in every table?  Keep in
> > mind this only occurs when none of the tables have any data to begin with.
Adam Harding - 13 Apr 2006 16:26 GMT
I have just tried to replicate

Table1 has three fields 1, 2 and ID
Table 2 has 4 fields, 3,4,ID and Numbers which links on a one-to-many basis
in the database and in infopath
table 3 has 4 fields, 5,6,Id and Numbers which links on a one-to-many basis
in the database and in infopath

I then linked them in infopath on a one-to-many relationship such that when
i set up the tables in the data connection they all had the little blue arrow
in the bottom left corner of their icon indicating this.  try this yourself
and then go into preview to show how independant they are.

I cannot replicate your problem.

If you go into DataSource and click the drop-down arrow next to the 2nd or
3rd table and see if it gives you the option to insert a repeating table, if
it does then they will repeat independantly.

can you print-screen the datasource view of your form and i will probably
see what is wrong fairly quickly.  Mail it to adam.harding@ltsbasset.co.uk
you will have to ZIP it up first to get it through our firewall.

Cheers Adam

> Adam,
> The database already has separate tables.  As an example, there is a Table A
[quoted text clipped - 57 lines]
> > > How can I stop InfoPath from inserting a new row in every table?  Keep in
> > > mind this only occurs when none of the tables have any data to begin with.
 
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.