Can an XML file be used as the main data source?

R

rhrempel

I know that I can add an XML file as a resource. But can it be the main data
source? How do I bind it to form fields?
 
S

S.Y.M. Wong-A-Ton

Yes. Use the "New from XML Document or Schema..." option when creating a new
form or the "Tools > Convert Main Data Source..." menu item when wanting to
convert an existing form.

S.Y.M. Wong-A-Ton
 
R

rhrempel

Thanks! That helped me a lot.
How can I create a Master/Detail section on a form that uses an XML file? I
want to display the XML data in rows in the Master section. The user can
select on a row and see all of the row data in the Detail section.
I can create a Master/Detail section. But changing the Binding group names
in both sections breaks the relationship. That is, the Repeating Table is no
longer the Master. The Repeating Section no longer displays a Master/Detail
tab in the Properties.
So I'm wondering if it is possible to use an XML file in this way?
 
S

S.Y.M. Wong-A-Ton

Click on the main repeating node (the node that should become the master),
drag it to the form, drop it, and select "Master/Detail" from the context
menu that appears. If your XML is set up correctly to enable master/detail
support, the bindings will be set automatically and correctly; no need to do
this yourself.

S.Y.M. Wong-A-Ton
 
R

rhrempel

Thanks again. You were right. I kept trying to make it work. Finally, I went
and looked at the XML and saw that the structure was not correct. I fixed it
and everything worked well.
 
B

BowieM

Hi,

I thought it was necessary to continue the thread but changed the subject to
reflect a new entry.

I see you talk about the XML being set up correctly for "master-detail"
relationships - does this mean that I have to repeat the master key field in
the detail portion of the XML?

I have an XML that partially looks likes this:
----
<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
 

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