AnsweredAssumed Answered

Create record + extend found-set fails to render fully in layout

Question asked by justinc on Feb 21, 2017
Latest reply on Feb 21, 2017 by TSGal

I'm having an issue with a local FM file that appears to consistently fail to refresh a cache or gets an index corrupted in some way.


A brief description of the ecosystem I'm working with.  These are all local files (while I do development):

    * ClientA file

    * Client B file - this is a copy of the same file as ClientA (each client will have a separate file, but it is a copy of the same structure)

    * CentralFile:  this is a central file used by all Clients; their files have an external datasource defined to point at the same file


The general workflow: 

    * Client A can create a 'Project' in their file.  They can choose to 'share' that Project with an outside user (Client B).  They set up the user in their ClientA file, it generates a record in the CentralFile and a code, and ClientA sends that code to ClientB.

    * Client B takes that code and enters it into a field in their own file.  They are then able to create new related records to that new Project (i.e. in the ClientB file), and can eventually choose to share those related records back to A.


The problem crops up at the first time Client B attempts to 'join' (i.e. create the link) the Project shared from ClientA.


Assuming the ClientB user is NOT starting from a pristine unused copy of their file, but still one with 0 records in the Project table...

They start by clicking a button and entering a Join code from ClientA; the scripted process records a few bits of data in the CentralFile's record (the one that was created by ClientA), and it creates a new local Project record, as well.  This process (both parts) are done using a GTL, Find, edit, return routine - in a new offscreen window.  Then the sub-window is closed, and a Find+Extend is done on the original Project layout in order to expose the newly created Project record.


This is when it gets messed up.  The new record is only partly rendered in the layout window.  A new 'record' is shown in the list view - the buttons and icons in the row show up, but not the field data from the record.  I have some developer fields on the layout for testing, they show that this apparently present record doesn't have a primary key defined.  Perhaps not surprising since the found set is apparently 0 of 1, of 1 total (looking at the indicator in the Toolbar).  It isn't possible to advance to this 1 record using the toolbar.  However, if I navigate to a different layout and come back (using scripted navigation buttons on the layout), the record re-renders in the found set and is all OK.  This appears to be due to some script triggers that fire on these layouts during this other navigation...although those triggers don't necessarily appear to be directly related to this Projects table or record.


Here's a screenshot of the messed up state:


FileB partly rendered record.png


* Oddly, when I first try to Join a shared Project from a pristine clone or copy/paste of the ClientA file, it all works great - the new Project record in the ClientB file renders correctly and completely.

* But if I then delete that Project and attempt to Join again (there's nothing to disallow this, and there shouldn't be any problem with it) it will fail to completely render the new Project record in ClientB's file.

* This problem only appears to happen if the local ClientB Project table is empty of all records - manually creating a local record and then attempting to Join the Share from ClientA allows the process to correctly complete.

* I am able to reproduce this every single time.  I have tried new copies of the clientB file (it's exactly the same file as the clientA file, so I just copy and paste, or 'save as -> clone').  I got the same results with a clone as with a copy/paste version of the original file.

* It failed repeatedly: I can try to join a share- it fails. I then navigate away and back so the record correctly renders and then delete the new record (so there are 0 records in the current table again).  I then j     oin the same share (same join code) and it fails to render again.

* It doesn't appear to be related to the particular Share code that I use - I have tried many different Shares from the ClientA file.

* I have tried FM 14.06 and 15.03 on OS X, and FM 14.05 on Windows 10.  They all fail in the same manner.


I'm willing to share the files, and am in the middle of preparing a demo video showing the issue; if a TS tech has time to review them, please send me a link or address where I can send the materials.