AnsweredAssumed Answered

Moving between instances of the same table

Question asked by andy_edinburgh on Sep 22, 2016
Latest reply on Sep 25, 2016 by andy_edinburgh

I am a relative newcomer to FileMaker, using FileMaker 15 Pro Advanced. I am trying to do something that sounds as if it should be easy but isn’t. Due to the complex structure of my database, I unfortunately have to have several occurrences of the same table, OBJECT, called OBJECT 1, OBJECT 2, OBJECT 3, etc. I have several layouts, LAYOUT 1, LAYOUT 2, LAYOUT 3, ... each attached to the corresponding occurrence. In some cases, I have more than one layout on the same occurrence, so LAYOUT 1a and LAYOUT 1b are both attached to OBJECT 1.


Now, when the user moves between layouts on the same occurrence, e.g. LAYOUT 1a to LAYOUT 1b, FileMaker preserves the OBJECT 1 ‘state’ comprising the last find, sort order, and selected record for OBJECT 1. If she moves from LAYOUT 1 to LAYOUT 2, however, FileMaker leaves her OBJECT 1 state behind and gives her the OBJECT 2 state, i.e. the last find, sort order and selection she did last time she was there; initially, the full set and the first record.


What I want to achieve is that the user moves between all these layouts as if they were attached to the same occurrence. Correct me if I am wrong or overcomplicating it, but it would appear that I need the script triggered by the button to move from LAYOUT 1 to LAYOUT 2 to capture the state of OBJECT 1 and apply it to OBJECT 2? It seems that it needs to make a note of which records are in the current OBJECT 1 found set, what the sort order is and which one is currently selected; then go to LAYOUT 2 based on OBJECT 2 and construct a new found set, sorted as in OBJECT 1; and finally select the record that was selected in OBJECT 1.


  1. Is there a simpler solution? You may assume that I am not able to base the layouts on the same table occurrence – I assure you I would if I could!
  2. Can you tell me how to write such a script? It took me ages to master the simple act of selecting the same record; I don’t know where to start with capturing the found set and sort order! I guess I need a loop that records a list of the record ids in the order they appear in the ‘from’ occurrence, OBJECT 1, then perform find on each of them in the ‘to’ occurrence, OBJECT 2? Note that OBJECT has a unique numeric primary key called #Object_id.


Is this a common problem? Should we get FileMaker to add some in-built functions? Or to change the nature of relationships so that multiple occurrences are not necessary? I find them very annoying! They seem to arise out of FileMaker’s abandonment of the one-to-many relationship, treating all as many-to-many and hence creating apparent ‘loops’ in relationship graphs where none is really present. Is that necessary?