I
INTP56
Here's what I'm trying to do.
I have a People table, call it P.
I have an Experiments table, call it E that has a FK back to P
I have a Samples table, call it S, that has a FK back to E
I want to make an infopath form to manage Samples.
In the data area, I want a repeating section (that holds E data) with a
repeating table (that holds S data). I want to do a lookup on FK_P and
replace it with PName in the Experiment section.
So, I can do all this using a dropdown on FK_P and doing a lookup.
However, this for is for managing Samples, not Experiments, I have a
separate form for managing Experiments. I can take away the insert for
Experiments, but I want to disallow any potential UPDATEs to Experiments
while still displaying the information in Experiments. If I used text boxes,
I could make them read only, but now I can't do the lookup for FK_P. I've
tried using Expression boxes, but I can only get it to display the first
record in a table, not a lookup based on a value in the repeating section.
It's possible for an Experiment to have no samples, in fact, this form is
intended to create samples for those Experiments, as well as update other
sample information.
I could just make a Sample form, and pick Experiments, but then I wouldn't
see the rest of the information for the record. Besides, the user wants to
see the samples grouped by Experiments.
My first impression was how do I do lookups without using a dropdown box,
but any ideas on how to do what I described would also be appreciated.
Bob
--SQL Server 2005 DDL for those so inclined
--NOTE: This is an example demonstrating the issue I am having.
--These are not the actual tables.
DROP TABLE dbo.S;
DROP TABLE dbo.E;
DROP TABLE dbo.P;
GO
CREATE TABLE dbo.P
(
PID INT IDENTITY(1,1) PRIMARY KEY
,PName VARCHAR(36)
,PPhone VARCHAR(20)
);
CREATE TABLE dbo.E
(
EID INT IDENTITY(1,1) PRIMARY KEY
,EName VARCHAR(36) UNIQUE
,EDescription VARCHAR(250)
,FK_P INT FOREIGN KEY REFERENCES dbo.P(PID)
);
CREATE TABLE dbo.S
(
SID INT IDENTITY(1,1) PRIMARY KEY
,SName VARCHAR(36) UNIQUE
,STime DATETIME
,SDescription VARCHAR(250)
,FK_E INT FOREIGN KEY REFERENCES dbo.E(EID)
);
GO
I have a People table, call it P.
I have an Experiments table, call it E that has a FK back to P
I have a Samples table, call it S, that has a FK back to E
I want to make an infopath form to manage Samples.
In the data area, I want a repeating section (that holds E data) with a
repeating table (that holds S data). I want to do a lookup on FK_P and
replace it with PName in the Experiment section.
So, I can do all this using a dropdown on FK_P and doing a lookup.
However, this for is for managing Samples, not Experiments, I have a
separate form for managing Experiments. I can take away the insert for
Experiments, but I want to disallow any potential UPDATEs to Experiments
while still displaying the information in Experiments. If I used text boxes,
I could make them read only, but now I can't do the lookup for FK_P. I've
tried using Expression boxes, but I can only get it to display the first
record in a table, not a lookup based on a value in the repeating section.
It's possible for an Experiment to have no samples, in fact, this form is
intended to create samples for those Experiments, as well as update other
sample information.
I could just make a Sample form, and pick Experiments, but then I wouldn't
see the rest of the information for the record. Besides, the user wants to
see the samples grouped by Experiments.
My first impression was how do I do lookups without using a dropdown box,
but any ideas on how to do what I described would also be appreciated.
Bob
--SQL Server 2005 DDL for those so inclined
--NOTE: This is an example demonstrating the issue I am having.
--These are not the actual tables.
DROP TABLE dbo.S;
DROP TABLE dbo.E;
DROP TABLE dbo.P;
GO
CREATE TABLE dbo.P
(
PID INT IDENTITY(1,1) PRIMARY KEY
,PName VARCHAR(36)
,PPhone VARCHAR(20)
);
CREATE TABLE dbo.E
(
EID INT IDENTITY(1,1) PRIMARY KEY
,EName VARCHAR(36) UNIQUE
,EDescription VARCHAR(250)
,FK_P INT FOREIGN KEY REFERENCES dbo.P(PID)
);
CREATE TABLE dbo.S
(
SID INT IDENTITY(1,1) PRIMARY KEY
,SName VARCHAR(36) UNIQUE
,STime DATETIME
,SDescription VARCHAR(250)
,FK_E INT FOREIGN KEY REFERENCES dbo.E(EID)
);
GO