Master/Detail seem backwards

S

SteveC

I find that the concept of the Master/Detail in InfoPath seems backwards
compared to use of a similar concept in MS Access. It would seem that the
Master section should be the One side and the Detail should be the Many Side,
and the Mant side should use a table to list row of repeating items.
Instead, the Master is always a repeating table, which is very confusing.

My goal is to develop what I hope is a simple solution using a one-to-many
relationship on a form that is disconnected from a database and allows a user
to save each form as an XML file, which can later be imported to Access
tables - basically an Order-Oder Details type situation. Amazingly what is a
simple concept to implement in Access is alluding me in InfoPath.

Am I missing something here, or is InfoPath not up to this task at this point?

Thanks,

SteveC
 
S

Scott L. Heim [MSFT]

Hi Steve,

If I understand correctly you would like to create an InfoPath form that is
*not* bound to any database but would have its data in the proper format
(relationship) such that the resulting XML files can be imported into an
Access database...is this correct?

Assuming I have understood correctly, try the following sample steps and
see if this helps:

- Create a new, blank InfoPath form
- Display the Data Source Task Pane
- Right-click on myFields and choose Add:

- Name: Orders
- Type: Group, Repeating
- Click OK

- Right-click on Orders and choose Add:

- Name: txtOrderID
- Type: Field
- Click OK
- Repeat and add fields: txtCustomerID and txtOrderDate

- Right-click on Orders and choose Add:

- Name: OrderDetails
- Type: Group, Repeating
- Click OK

- Right-click on OrderDetails and choose Add:

- Name: txtOrderID_Details
- Type: Field
- Click OK
- Repeat and add fields: txtProductID, txtProductDesc, txtQuantity,
txtPrice

- Click and drag the "Orders" node to the form and choose Repeating Section
with Controls
- Right-click on the Repeating Table control that was created (this is for
OrderDetails) and choose Repeating Table Properties
- Select the Display tab and click the Filter Data button
- Click Add and then complete the following:

- 1st box: txtOrderID_Details
- 2nd box: Is Equal To
- 3rd box: Choose Select a field or group and select the OrderID field
from the Orders group

** NOTE: What this is doing is "filtering" the OrderDetails group to only
show those records where the txtOrderID_Details value matches the
txtOrderID field in the Orders group.

- Right-click on the txtOrderID_Details field in the Repeating Table and
choose Properties
- Click the "formula" button next to the Default Value field, click Insert
Field or Group and select the txtOrderID field from the Orders group
- Test!

Obviously this would need some additional fields, formatting, etc. but
hopefully this gives you an overview of how this can be done.

I hope this helps you!

Scott L. Heim
Microsoft Developer Support

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

SteveC

Scott,

That was a very good explanation and it worked (although I have yet to try
importing into Access). Apparently I misinterpreted the use of the
Master/Detail. I am somewhat suprised that the InfoPath help doesn't cover
this situation, since from what I am seeing one of the more useful aspects of
InfoPath would be to allow mutilple users in various remote "disconnected"
locations to enter data in a form and then later have the forms be imported
to the Access database.

My original attempts involved exporting the schema from Access and importing
it to InfoPath. I ran into various problems with that and it became obvious
it was not a seamless task and would invoolve a greather understanding (and
modification) of the XML. But replicating the Access table manually in
InfoPath will work for now.

Thanks,

SteveC
 
S

Scott L. Heim [MSFT]

Hi Steve,

Sorry for the delay in responding as I was unexpectedly out of the office.

I am glad you were able to get the process working. The other thing you may
want to have a look at when you have time is one of the InfoPath SDK
samples, DataInterop. This demonstrates "OnLine" and "OffLine"
capabilities. It's not a walk in the park getting this process to work but
it may be worth looking into depending on your scenario.

In case you don't have this, here is the link to the InfoPath SDK:

http://www.microsoft.com/downloads/details.aspx?FamilyId=351F0616-93AA-4FE8-
9238-D702F1BFBAB4&displaylang=en

Take care,

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