Issue report by PhilModJunk
Product
FileMaker ProVersion
11.03Operating system version
Windows 7Description of the issue
When using GetNthRecord to return a value from a related table inside a calculated script parameter, it returns a value from the first related record instead of the Nth Record.Steps to reproduce the problem
I'm using this calculation inside the script parameter box:List ( GetNthRecord (Dates::DateField ; $$RecordNumber ) ; 1 )
The related records in Date are:
8/3/2011
8/10/2011
and $$RecordNumber = 2
If I put GetNthRecord ( Dates::Datefield ; $$RecordNumber ) in the data viewer, I can confirm that 8/10/2011 is returned just before I click the button that passes this parameter to my script. Using the debugger to halt the script on its first line of code, shows that it still evaluates as 8/10/2011, but Get ( ScriptParameter ) returns: 8/3/2011¶1.
Expected result
8/10/2011¶1Actual result
8/3/2011¶1Workaround
Use steps within the script to find and access the Nth related record in this table.GetValue ( List ( Dates::dateField ) ; $$RecordNumber ) is also an alternative that occurs to me while typing this report, but have yet to test that approach...