Jump to content

complex relationship needed, 1 record with 2 fields in 1 table to 1 record 1 field another table


rsbosko
 Share

This topic is 5683 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I work with patient samples and often mix two samples together when doing analysis. The data from the instrument used gives me an output file with one record for each run that contains two sample names (ID1 and ID2). After the first run, I then rerun variable samples by themselves and end up with one record with one sample name.

In filemaker, I created a database that contains a table (data1, data2 etc)for each run conducted and a table (ID) with sample IDs to pull all the data together in one layout through portals. I began by importing the data twice into filemaker, once for sample ID 1 and then again for sample ID 2. Both IDs were imported into one sample ID field. By creating duplicates of the data for each sample ID, the realtionships worked fine. And the data was able to be displayed in a list that I could go across the row and see all the results for one individual sample.

But my boss only wants the data imported into filemaker once so that there is less chance for errors or alterations to the data. Because of this I need to find some way to relate both sample ID 1 and sample ID 2 from my data table to sample ID in my ID table. This relationship needs to allow me to display the data with a single column for sample ID followed by columns for each analysis result. Because the portals can only display data from one table, creating duplicate table occurances has not worked for me.

How can I get around this problem so that I won't need to import data twice?

Link to comment
Share on other sites

  • Newbies

So I take it no one has any idea of how to deal with this.

If the relationship is not the way to go. Is there a way to create a "go between" table that would copy the data in twice(once for each sample name)? I think this would work but there would still be an issue with the primary key. Sample ID is the only thing that is a constant between runs. Can you import data from one table into another? And if so, can it be linked so that when the original parent table is updated, the child table updates also?

Any help would be awesome..

Link to comment
Share on other sites

  • 2 weeks later...
  • Newbies

I see still not a soul has an idea as to how to fix my problem.

That's ok. As it turns out I solved it myself.

I created a primary key field which is an automatic serial number for each imported record and then linked that to a new table through a complex script that completes my whole process from importing records, to making double copies of the data needed (my primary key bc everything else is automatically displayed). If anyone else has this same issue, I explain how I wrote the script. It may still have some bugs to work out, but it does exactly what i need it to do.

Link to comment
Share on other sites

This topic is 5683 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.