Lookups without using DropDowns

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
 
Z

Zhang Haiguang

I know your question a little, just some thought:
Please keep the FK_P field in experiment section as expression box.
And add a new dropdown box out of the experiment section, the dropdown box
linked to P table(PID) and shows PName list.
Add a data filter to the expriment section to lookup the record by the
condition FK_P equals the value of the new dropdown box.
So you could lookup the expriment record using the outter dropdown box.
Sorry my english to describe the complex problem ...

InfoJet Service,
InfoPath Web Form,
http://www.infojetsoft.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