Relational Data

G

Geoff Hirst

Hi,

Anyone out there managed to make relational data appear correctly in an
infopath form? What I mean is proper master/detail items such as invoices
and invoice lines?

Be really interested if anyone can point me in the general direction of
something like this running from a webservice or database.

thanks

G.
 
G

Geoff Hirst

Alex,

This is fine. I Followed this. I come from a relational database background,
like many people. What I am trying to display for example would be Customer
Details (held in one table or data source) to be displayed as master, and
then customer orders (held in another table or data source, webservice etc).
All the master detail examples I have seen seem to be focused around a
single data source. Is this how Infopath works? Master/Detail on a single
datasource?

I have tried to use this idea with 2 datasources, one for customers and one
for invoices. No go. Infopath doesn't see the link in the data. despite what
I tell it.

What I am trying to do is display the data rather than enter any new items.
I would have expected to have set the master section to my customers
webservice and the detail section to be orders webservice. This doesn't
happen.

If I set the binding of the master section to my Customers datasource
(webservice) the controls on the master/detail section for the repeating
table properties are not selectable. If I change each individual text box
binding to my customers data source, when I preview the form I see only the
very first row of the datasource. Nothing repeats.

So, I know that I am doing something wrong, what exactly I know not.
However, the way that infopath brings data together does not follow any
rules that I can find.

Am I trying to make infopath do something that it's not meant to? I know
that it's really a data-entry tool, but surely it can display data from a
data source too.



Thanks

Geoff
 
M

mag31

Hi Geoff,

Some ideas for you:

1. Relational Databases allow you to have 1-1, 1-many and many-many
relationships - Infopath uses xml to specify its data structure - xml can
manage 1-1, 1-many and many-many relationships, but being a tree structure
requires references to manage many to many relationships - Infopath doesn't
really support these.

2. Your relational database should have primary keys for both the customer
details table and the customer orders table and each customer orders table
should have a secondary key for the customer details

You therefore make a data structure that has the customer details table as
the root node of the xml data structure and has many orders as sub nodes -
this allows you to display the data with customer details as master and
customer orders as details.

Best Regards,
Mark Grant
Cambridge Convergence Limited
www.cambridgeconvergence.com


Geoff Hirst said:
Alex,

This is fine. I Followed this. I come from a relational database background,
like many people. What I am trying to display for example would be Customer
Details (held in one table or data source) to be displayed as master, and
then customer orders (held in another table or data source, webservice etc).
All the master detail examples I have seen seem to be focused around a
single data source. Is this how Infopath works? Master/Detail on a single
datasource?

I have tried to use this idea with 2 datasources, one for customers and one
for invoices. No go. Infopath doesn't see the link in the data. despite what
I tell it.

What I am trying to do is display the data rather than enter any new items.
I would have expected to have set the master section to my customers
webservice and the detail section to be orders webservice. This doesn't
happen.

If I set the binding of the master section to my Customers datasource
(webservice) the controls on the master/detail section for the repeating
table properties are not selectable. If I change each individual text box
binding to my customers data source, when I preview the form I see only the
very first row of the datasource. Nothing repeats.

So, I know that I am doing something wrong, what exactly I know not.
However, the way that infopath brings data together does not follow any
rules that I can find.

Am I trying to make infopath do something that it's not meant to? I know
that it's really a data-entry tool, but surely it can display data from a
data source too.



Thanks

Geoff
Alex said:
Geoff,

I would start here:

http://blogs.msdn.com/infopath/archive/2004/04/06/108694.aspx

Good luck,
Alex @ Microsoft

-----Original Message-----
From: Geoff Hirst [mailto:[email protected]]
Posted At: Wednesday, May 04, 2005 2:06 PM
Posted To: microsoft.public.infopath
Conversation: Relational Data
Subject: Relational Data

Hi,

Anyone out there managed to make relational data appear correctly in an
infopath form? What I mean is proper master/detail items such as
invoices
and invoice lines?

Be really interested if anyone can point me in the general direction of
something like this running from a webservice or database.

thanks

G.
 
G

Geoff Hirst

Mark,

Thanks for this.

From what you say then am I correct if I create a customer object (in my
webservice), that contains their orders, as say an array of order objects. I
would expect from this that the xml produced would be similar to what you
mention in your 2nd para of no.2.

Would you say this is more along the lines of how relational data should be
used in Infopath?

Thanks again

regards

Geoff.


mag31 said:
Hi Geoff,

Some ideas for you:

1. Relational Databases allow you to have 1-1, 1-many and many-many
relationships - Infopath uses xml to specify its data structure - xml can
manage 1-1, 1-many and many-many relationships, but being a tree structure
requires references to manage many to many relationships - Infopath
doesn't
really support these.

2. Your relational database should have primary keys for both the customer
details table and the customer orders table and each customer orders table
should have a secondary key for the customer details

You therefore make a data structure that has the customer details table as
the root node of the xml data structure and has many orders as sub nodes -
this allows you to display the data with customer details as master and
customer orders as details.

Best Regards,
Mark Grant
Cambridge Convergence Limited
www.cambridgeconvergence.com


Geoff Hirst said:
Alex,

This is fine. I Followed this. I come from a relational database
background,
like many people. What I am trying to display for example would be
Customer
Details (held in one table or data source) to be displayed as master, and
then customer orders (held in another table or data source, webservice
etc).
All the master detail examples I have seen seem to be focused around a
single data source. Is this how Infopath works? Master/Detail on a single
datasource?

I have tried to use this idea with 2 datasources, one for customers and
one
for invoices. No go. Infopath doesn't see the link in the data. despite
what
I tell it.

What I am trying to do is display the data rather than enter any new
items.
I would have expected to have set the master section to my customers
webservice and the detail section to be orders webservice. This doesn't
happen.

If I set the binding of the master section to my Customers datasource
(webservice) the controls on the master/detail section for the repeating
table properties are not selectable. If I change each individual text box
binding to my customers data source, when I preview the form I see only
the
very first row of the datasource. Nothing repeats.

So, I know that I am doing something wrong, what exactly I know not.
However, the way that infopath brings data together does not follow any
rules that I can find.

Am I trying to make infopath do something that it's not meant to? I know
that it's really a data-entry tool, but surely it can display data from a
data source too.



Thanks

Geoff
Alex said:
Geoff,

I would start here:

http://blogs.msdn.com/infopath/archive/2004/04/06/108694.aspx

Good luck,
Alex @ Microsoft

-----Original Message-----
From: Geoff Hirst [mailto:[email protected]]
Posted At: Wednesday, May 04, 2005 2:06 PM
Posted To: microsoft.public.infopath
Conversation: Relational Data
Subject: Relational Data

Hi,

Anyone out there managed to make relational data appear correctly in an
infopath form? What I mean is proper master/detail items such as
invoices
and invoice lines?

Be really interested if anyone can point me in the general direction of
something like this running from a webservice or database.

thanks

G.
 
M

mag31

Hi Geoff,

Sounds about right. Create the webservice and hook it into infopath as a
data source. Infopath should then work out the data structure.

Mark

Geoff Hirst said:
Mark,

Thanks for this.

From what you say then am I correct if I create a customer object (in my
webservice), that contains their orders, as say an array of order objects. I
would expect from this that the xml produced would be similar to what you
mention in your 2nd para of no.2.

Would you say this is more along the lines of how relational data should be
used in Infopath?

Thanks again

regards

Geoff.


mag31 said:
Hi Geoff,

Some ideas for you:

1. Relational Databases allow you to have 1-1, 1-many and many-many
relationships - Infopath uses xml to specify its data structure - xml can
manage 1-1, 1-many and many-many relationships, but being a tree structure
requires references to manage many to many relationships - Infopath
doesn't
really support these.

2. Your relational database should have primary keys for both the customer
details table and the customer orders table and each customer orders table
should have a secondary key for the customer details

You therefore make a data structure that has the customer details table as
the root node of the xml data structure and has many orders as sub nodes -
this allows you to display the data with customer details as master and
customer orders as details.

Best Regards,
Mark Grant
Cambridge Convergence Limited
www.cambridgeconvergence.com


Geoff Hirst said:
Alex,

This is fine. I Followed this. I come from a relational database
background,
like many people. What I am trying to display for example would be
Customer
Details (held in one table or data source) to be displayed as master, and
then customer orders (held in another table or data source, webservice
etc).
All the master detail examples I have seen seem to be focused around a
single data source. Is this how Infopath works? Master/Detail on a single
datasource?

I have tried to use this idea with 2 datasources, one for customers and
one
for invoices. No go. Infopath doesn't see the link in the data. despite
what
I tell it.

What I am trying to do is display the data rather than enter any new
items.
I would have expected to have set the master section to my customers
webservice and the detail section to be orders webservice. This doesn't
happen.

If I set the binding of the master section to my Customers datasource
(webservice) the controls on the master/detail section for the repeating
table properties are not selectable. If I change each individual text box
binding to my customers data source, when I preview the form I see only
the
very first row of the datasource. Nothing repeats.

So, I know that I am doing something wrong, what exactly I know not.
However, the way that infopath brings data together does not follow any
rules that I can find.

Am I trying to make infopath do something that it's not meant to? I know
that it's really a data-entry tool, but surely it can display data from a
data source too.



Thanks

Geoff
Geoff,

I would start here:

http://blogs.msdn.com/infopath/archive/2004/04/06/108694.aspx

Good luck,
Alex @ Microsoft

-----Original Message-----
From: Geoff Hirst [mailto:[email protected]]
Posted At: Wednesday, May 04, 2005 2:06 PM
Posted To: microsoft.public.infopath
Conversation: Relational Data
Subject: Relational Data

Hi,

Anyone out there managed to make relational data appear correctly in an
infopath form? What I mean is proper master/detail items such as
invoices
and invoice lines?

Be really interested if anyone can point me in the general direction of
something like this running from a webservice or database.

thanks

G.
 
G

Geoff Hirst

Mark,

Thanks for this in essence some of my issues are now solved. I have managed
to achieve a client and their associated list of orders.

This was mainly an exercise as my actual project that I have to undertake is
an infopath application to display multiple choice questions. Now, this
application has questions that may have a single answer or a combination of
answers that provide a correct solution.

I have been considering this project for some days, and I am not convinced
that Infopath is the ideal candidate for such a project. Given that a
candidate would recieve a number of questions, and each question has a
number of answers, it does resemble the customer/orders scenario I was
prototyping.

Ideally, I would want to display a single question to a page, provide
previous and next buttons for the candidate to work through their questions,
also to provide an option to be able to 'come back' to a question should
time permit.

I have worked with infopath as a data-entry tool for some time, I am not
convinced that infopath can undertake this task, given the presentation that
is required for this project.

Could you offer your opinion on Infopaths suitability for this project?

kind regards

Geoff Hirst


mag31 said:
Hi Geoff,

Sounds about right. Create the webservice and hook it into infopath as a
data source. Infopath should then work out the data structure.

Mark

Geoff Hirst said:
Mark,

Thanks for this.

From what you say then am I correct if I create a customer object (in my
webservice), that contains their orders, as say an array of order
objects. I
would expect from this that the xml produced would be similar to what you
mention in your 2nd para of no.2.

Would you say this is more along the lines of how relational data should
be
used in Infopath?

Thanks again

regards

Geoff.


mag31 said:
Hi Geoff,

Some ideas for you:

1. Relational Databases allow you to have 1-1, 1-many and many-many
relationships - Infopath uses xml to specify its data structure - xml
can
manage 1-1, 1-many and many-many relationships, but being a tree
structure
requires references to manage many to many relationships - Infopath
doesn't
really support these.

2. Your relational database should have primary keys for both the
customer
details table and the customer orders table and each customer orders
table
should have a secondary key for the customer details

You therefore make a data structure that has the customer details table
as
the root node of the xml data structure and has many orders as sub
nodes -
this allows you to display the data with customer details as master and
customer orders as details.

Best Regards,
Mark Grant
Cambridge Convergence Limited
www.cambridgeconvergence.com


:

Alex,

This is fine. I Followed this. I come from a relational database
background,
like many people. What I am trying to display for example would be
Customer
Details (held in one table or data source) to be displayed as master,
and
then customer orders (held in another table or data source, webservice
etc).
All the master detail examples I have seen seem to be focused around a
single data source. Is this how Infopath works? Master/Detail on a
single
datasource?

I have tried to use this idea with 2 datasources, one for customers
and
one
for invoices. No go. Infopath doesn't see the link in the data.
despite
what
I tell it.

What I am trying to do is display the data rather than enter any new
items.
I would have expected to have set the master section to my customers
webservice and the detail section to be orders webservice. This
doesn't
happen.

If I set the binding of the master section to my Customers datasource
(webservice) the controls on the master/detail section for the
repeating
table properties are not selectable. If I change each individual text
box
binding to my customers data source, when I preview the form I see
only
the
very first row of the datasource. Nothing repeats.

So, I know that I am doing something wrong, what exactly I know not.
However, the way that infopath brings data together does not follow
any
rules that I can find.

Am I trying to make infopath do something that it's not meant to? I
know
that it's really a data-entry tool, but surely it can display data
from a
data source too.



Thanks

Geoff
Geoff,

I would start here:

http://blogs.msdn.com/infopath/archive/2004/04/06/108694.aspx

Good luck,
Alex @ Microsoft

-----Original Message-----
From: Geoff Hirst [mailto:[email protected]]
Posted At: Wednesday, May 04, 2005 2:06 PM
Posted To: microsoft.public.infopath
Conversation: Relational Data
Subject: Relational Data

Hi,

Anyone out there managed to make relational data appear correctly in
an
infopath form? What I mean is proper master/detail items such as
invoices
and invoice lines?

Be really interested if anyone can point me in the general direction
of
something like this running from a webservice or database.

thanks

G.
 
Top