How can an XML file be used in a master-detail relationship?

B

BowieM

Hi,

The question "Can an XML file be used as the master-detail relationship?"
was posed by "rhrempel" to which "S.Y.M Wong-A-Ton" responded.

In their exchange both spoke about setting up the XML correctly for
"master-detail"
relationship to work in InfoPath.

My question is how do you "correctly" define the XML? Does it mean that I
have to repeat the master key field in the detail portion of the XML?

Basically what I want is to be able to recall master-detail information that
was saved in SQL Server back into an InfoPath form so that it can be updated.
I use Web Services to interact with SQL Server. Once I return the data set it
is available to me InfoPath but I need a means of populating the detail
repeating section each time the master is altered.

Here is a snippet of an XML that I am using:
----
<report>
<department>A</department>
<departpmemtn>
<introductions>
<introduction seq=1.0>texttextext</introduction>
<introduction seq=2.0>texttextext</introduction>
<introduction seq=2.0>texttextext</introduction>
<introductions>
<issues>
<issue seq=1.0>texttextext</issue>
<issue seq=2.0>texttextext</issue>
<issues>
</report>
--

I need to relate the department to the introductions and the issues. In the
form, I have a list of department that when selected must display al the
introductions and the issues stored in this XML in two separate repeating
tables. How do I link the master table containing the list of departments to
the detail table(s)? Do I have to add the department field in the form (and
the XML) ?
Regards,
Bowie M
 
C

Clay Fox

Hi Bowie.

I have not tried a master detail in XML, but definetily I would assume you
would need all of the data relationships to be available in the dat in the
same way as if it was in a database.

My question if you have SQL, why don't you use the data from there instead
of adding another step with the XML?
This seems like a lot of work when the data is in your database already and
can be manipulated there.

Have you looked at the Database Accelerator package from
http://www.qdabra.com ?
It allows queries and submits to your database directly.

--
Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com
 
B

BowieM

Hi Clay,

The data I am working with is not structured; storing it into a SQL Server
database that does not support Object Oriented DB is a nightmare. Without
normalising I'm looking at a hundren fields or so; with normalising, the
number or "relationship" tables may eclipse the number of tables storing the
data. So storing the data I'm working as an XML within the a single XML Type
field was my best option.
 
C

Clay Fox

Master / Detail relies on relationship as well so if your relationships are
complex then I think you would be facing the same challenges in XML creating
relationships as you would in SQL.

Probably no easy solution for complex data.
--
Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com
 

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