Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Recognize selfjoin relationship when creating through portal


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

Recommended Posts

Posted (edited)

I am pretty sure that this is just the nature of the information flow in filemaker (perhaps even just the nature of time itself...), but I was wondering if anyone had found a non plugin way around this.

Basically, I am trying to get a freshly created line item in an invoice to recognize itself through a selfjoin before being committed.

The attached file is an experiment with a different kind of conditional value list that works fine for items that have already been comitted once, but does not work for new ones.

I have also run into this 'problem' in other contexts.

Thanks,

-Raz

*Whoops, minor mistake in first file, reposted new one.

ConditionalRepeatList.fp7.zip

Edited by Guest
Posted

What is the purpose here? The value lists in your file can work if based on relationship(s) with Products - but I suspect you knew that. A phantom record does not "know" anything that depends on its own ID (which might not even yet exist) or on its parent. The latter part especially is a big problem.

Posted

Thanks for that link, it does seem to be the same principle involved.

I suppose the purpose here is to have a clear understanding of how FM deals with establishing relationships between the time of creation and first commit. The value list is just confusing the issue (as is the self join).

A phantom record does not "know" anything that depends on its own ID

Yes, the self join is confusing things (and adds the complication of having to look for itself while it is in the process of entering existence). The behavior in question is also displayed in a non join situation. I had come to a slightly different conclusion: A phantom record is not 'known' by anything other than the parent that is 'giving birth' to it."

I reframed the issue in a bit more practical scenario in the attached file. Let us say I am trying to implement a Logic separation model. I have a separate Logic table that is pre populated with records that have the same ID as Items will when they are created. You can observe that an item can 'see' and 'know' it's logic record before being committed (the Test field is a simple autoenter that gets the ID data from the logic record to test this, which does depend on it's own ID. Similiar to a product info lookup), but the Logic record can not see or know an Item until it is committed (the Logic::ItemTotal field).

I am pretty resigned to this being just the way it is, but keep on getting hungup on the Generate on Creation/Commit checkbox in the serial autoenter box. Am I correct in thinking that this only changes when a serial number is 'pulled' from the big list of numbers that are next, and has nothing to do with when it receives its own relational identity independent of the parent?

I have found myself trying to solve this problem in several different contexts, and would like to put it to rest if possible.

Many thanks,

-Raz

Logic.fp7.zip

Posted

A phantom record is not 'known' by anything other than the parent that is 'giving birth' to it."

That may be true as well, but it doesn't quite cover the point of the aforementioned thread: a phantom LineItem WILL lookup from Products as soon as it has a ProductID fk; the same item will NOT lookup from (phantom) Invoice, even though it was "born" with the InvoiceID fk.

Posted

I don't know, perhaps it is just a matter of semantics. To me it seems to cover both situations.

Just for clarity, we are using the term 'phantom' to refer to any record that has been created but has not been committed yet.

In the referenced thread, there are multiple phantom records present at the same time, but the problem occurs with the phantom invoice, not with the phantom line item. I ran some more tests and pre-created some items, filled in some info and an Invoice ID for which there was no invoice, and then committed them. I then went back and created an invoice and gave it the ID of the pre-existing non-phantom items. As expected, the items instantly appeared in the portal. However, they would not look anything up from their invoice until it had been comitted.

It does seem that phantom records are fully capable of viewing and accessing the relational web, but do not become a part of it (are not known) until commital. The only records that can see them are parent or grandparent (or great grandparent...) records (phantom or not).

This explains the behavior of the referenced thread, as the items (phantom or not) can look out to the non phantom products, but can not see their phantom invoice parent (even though it can see them). So, I suppose the only modification I would make would be:

A phantom record is not 'known' by anything other than the direct parental lineage that is 'giving birth' to it.

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