Jump to content

Portal displaying some but not all related records


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

Recommended Posts

  • Newbies

Hi there- new member here so I hope I am posting this in the correct place. 

I've been messing with two of my table relationships for a long time now and I can't seem to figure out if I've correctly related them. Some records are being displayed as desired in a particular portal, but not all records are. The portal does not have any filters on it so I'm expecting to see ALL related records.

Here are my table relationships: 

spacer.png

Looking specifically at reports and tardinesstardiness_reports tables, I'm wanting to see all of the tardiness records for a particular report date/time in the report layout. 

Here are my tardiness entries for March 31: 

spacer.png

There are three records, so I would hope that all three records show up in the portal for the March 31 report. But for some reason, only the first two do: 

spacer.png

(You can ignore the tardiness_reports portal, tardiness is showing me what I'd expect but not John Robinson). 

A link to my test file can be found here: https://www.dropbox.com/s/0cy1f9ybd1t3i2l/Test.fmp12?dl=0 

If anyone can take a look or offer advice, that would be great. I've tried a number of things. 

 

Edited by relatively
Link to comment
Share on other sites

I wish I could understand what your file is supposed to track. Since I don't, I can only suggest that you follow the relationship trail.

Since you say you want to base the portal on the tardiness TO (why?) then the first step would be see which personnnel records are related to the current report. A portal to the inout table shows that the related personnel have ids 4, 5, 7. The "missing" tardines record belongs to personnel with id #6. Please note that am referring to your file, not to your screenshots above - which for some reason show different data, as if this wasn't confusing enough.

Since the person is unrelated to the report record, their tardiness records will not be related either. Conversely, all the tardiness records of the persons that are related will be shown in your portal - regardless of their date and time.

OTOH, if you fix the portal to the tardiness_reports TO so that the fields in it come from the same occurrence, I believe you will get the result you expect.

 

Link to comment
Share on other sites

  • Newbies

I really appreciate your time and reply.

1 hour ago, comment said:

I wish I could understand what your file is supposed to track. Since I don't, I can only suggest that you follow the relationship trail.

I'll try to clarify what is being tracked/the relationships: Personnel can have many tardies and personnel can have many inouts. Essentially, these relationships keep track of when a person is late and when a person is in or out of a performance. A Tardiness record has only one performance date and performance time. Same for an inout record- they only have one performance date and time. The idea is that the report shows all the tardiness records and inout records for a matching performance date and time. 

I was able to set up the inout correctly but not tardiness

Quote

Since you say you want to base the portal on the tardiness TO (why?) then the first step would be see which personnnel records are related to the current report. A portal to the inout table shows that the related personnel have ids 4, 5, 7. The "missing" tardines record belongs to personnel with id #6. Please note that am referring to your file, not to your screenshots above - which for some reason show different data, as if this wasn't confusing enough.

Since the person is unrelated to the report record, their tardiness records will not be related either. Conversely, all the tardiness records of the persons that are related will be shown in your portal - regardless of their date and time.

Apologies for the screenshot/file discrepancy, that is indeed confusing. What does "TO" mean here?  I guess I actually do want to be basing the portal off tardiness_reports, but that portal was giving me totally incorrect related records whereas tardiness was much closer. So I confused myself. 

The inout portal you're talking about is, in relation to the report table? I thought that every personnel would be related because the personnel::id = inout::actorOut_id. So then shouldn't every person be related to the report record? 

Quote

OTOH, if you fix the portal to the tardiness_reports TO so that the fields in it come from the same occurrence, I believe you will get the result you expect.

Wow, this does look like it was my problem. I didn't realize that the fields in tardiness_reports it were coming in from tardiness... thanks a ton for that.

With this fix alone I can move forward, however I am interested in understanding all your earlier points because maybe the way I have set these relationships up isn't the best. I'm not sure if that's all unnecessary though, considering I actually did intend to base the original portal in question on tardiness_reports.

Edited by relatively
Link to comment
Share on other sites

I'm still not sure what those things represent in real life. Anyway:

13 minutes ago, relatively said:

What does "TO" mean here?

TO means table occurrence. In your file, you have a tardiness table under the Tables tab (this is sometimes referred to as the base table). On the relationship graph this table has 2 occurrences: tardiness and tardiness report. 

13 minutes ago, relatively said:

I thought that every personnel would be related because the personnel::id = inout::actorOut_id. So then shouldn't every person be related to the report record? 

As I said, follow the trail: the relationship between the starting point of reports and inout (which is the first step on the route to tardiness) is matching on date and time - so only those inout records that have the same date and time as the current record in reports will be related. The next step is:

inout::actor_id out = personnel::id

which means that only the personnel that have an OUT record on the relevant date and time are related. As an aside, I suspect that is a weakness of your design, since you have no way of showing both ins and outs of a person from any layout of personnel. But as I said, I don't really understand what all this is about.

 

 

Link to comment
Share on other sites

This topic is 725 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
×
×
  • Create New...

Important Information

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