Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a bizarre situation which I am at a loss to explain at this point.

I have a table called Activities for which there can be any number of "Sessions" (another table). Clients are assigned to Activities first (join table called ClientActivityJoin) and afterward to the Activity's related Sessions (ClientSessionJoin). Through a relational filter, clients can only be assigned to Sessions in CSJ if they have a valid ClientActivityJoin record.

So for the general ERD:

ActivityKey (Activity table) --> ClientActivityJoin <-- ClientKey (from Client table)

ActivityKey (Activity) --> Session

SessionKey (Session) --> ClientSessionJoin <-- ClientKey (Client)

I am creating the associated Session, CAJ and CSJ records via portals in Activity:

Session portal is direct from Activity (PKeyActivity-->KeyActivity).

CAJ portal is direct from Activity (PKeyActivity-->KeyActivity).

CSJ is indirect via a global (gl_SessionKey [session]-->SessionKey [CSJ]).

No problems creating new Sessions or CAJs from here. Displays and adds records correctly.

Also, I can correctly display CSJ records in Activity via the global relationship, and I can correctly create CSJ records via the portal.

HOWEVER, when I create a new CSJ record via this relationship, quite mysteriously a new Session record is also created. The Session portal is not touched in this operation, and the relationship between Activity and Session (which allows creation of Session records) is not referenced. In addition, the newly created CSJ record is correctly tagged to the SessionKey global I was using (i.e., the SessionKey for the new CSJ record is the intended gl_SessionKey from the global, not the SessionKey for the "wrongly created" Session.

I have double checked all of the settings on my relationships to discern if I'm accidentally creating Sessions from some other relationship, but the only place is via Activity, not some roundabout other method. As far as I can tell, nothing is happening to Activity during this process. The Session record just appears out of nowhere.

By the way, client keys for CAJ and CSJ are actually lookups based on a global name relationships (pick names, not keys, to make the new records; correct Clients keys are then lookep for the join files).

Again, this seems to have nothing to do with Activity or Sessions except that the available names are filtered through other relationships (which make no records, etc.) based on location (for CAJ) and Activity (for CSJ).

Does anyone have any clue as to how or why this is happening? I'm stumped.

I'm attaching a section of my ERD, which may or may not help. (I wish you could see the creation settings in the graph.)

Many thanks.

ERD from Charlie.pdf

Posted

This seems like a bug to me.

So, was a duplicate Key_Activity made in the Session table based on the PKey_Activity?

Just out of curiosity, what happens if you turn on the validation that Key_Activity is unique?

Posted

Thanks for the response, though it's not making me feel any too good (!).

I'm not sure what you mean by a duplicate key. There is one Key_Activity in Session as the link to Activity, and this is auto-generated/copied when the record is created through the Sessions portal in Activity. (There are not two of these.)

I tried making the Activity key for Sessions unique (this would, of course, not be normal), and I got a warning when I created a new CSJ that (wrongly) created a new Session record. It said I needed Key_Activity but couldnt' do it on the Activity layout. Nevertheless, it created the record with the Activity Key, just as before.

I guess I'll try recreating the layout and see if it's one of those bizarre layout issues.

Is there any way of checking with Filemaker to determine if something like this is a bug?

Many thanks for your help, Mr. Shadow Person.

Posted

Just "Shadow" is fine.

I was hoping the uniqueness might have stopped the duplicate from being created, so it would reuse the existing Session record rather than making a new one. No joy.

The "TechInfo" database under FileMaker's support tab is the best place to find issues like this. I did a search and didn't locate anything.

Posted

Shadow and anybody else who cares -

Well, I've solved the immediate problem, but I don't understand why my change has the effect it does.

I was establishing the CSJ (join between Session and Client tables) by auto-creating from a global that was housed in Sessions. When I moved the global "up" one level, to Activity, the auto-session-generation phenomenon ceased.

This isn't very satisfactory as I don't understand why this should work any better than the first way I was doing it.

C'est la vie.

Thanks for your input.

This topic is 7492 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.