AnsweredAssumed Answered

Popover on-open script: Get(RecordNumber) shows prior record visited

Question asked by MichaelGallagher on Sep 8, 2015
Latest reply on Sep 8, 2015 by MichaelGallagher

Unexpected behavior for a popover button that runs a script OnObjectEnter, namely when the popover opens.  The script tries to capture as $$var Get(RecordNumber) for the record that contains the clicked button.  However, it actually captures the record number of the prior visited record.


So it looks like, at the time the popover button is clicked, the prior record visited is in fact the active record.  But I would expect that, when the popover opens, Get(RecordNumber) would be the one that contains the popover rather than the last record visited. 


There is also a disparity between  between {{RecordNumber}} and Get(RecordNumber), where the former produces the expected result. 


So if I was on record 9 (active) and then clicked a popover button on record 3, these would evaluate in the popover as


{{RecordNumber}} = 3

<<$$var>> = 9  (when captured via OnObjectEnter script as Get (RecordNumber)


Unfortunately, there is no way to access {{RecordNumber}} for further use.


I should add that once the popover button has been opened, filemaker shows the associated record to be the active record (black margins).  I just wish it would become the active record PRIOR to executing its associated script.