AnsweredAssumed Answered

Hide Object When in 17 misfires on record number 1

Question asked by William-Porter on Jun 5, 2018
Latest reply on Feb 18, 2019 by beverly

In FileMaker 17, there seems to be problem with Hide Object When and first record in a list.


When I do a list report in which the first column has to appear as a column (rather than say as a subsummary part title) but where there’s a lot of repetition in that first column, I like to hide the repeated values. For example, in a list of events sorted by dates where many events have the same date, I'll put dates in column 1, then show first occurrence of a date but hide subsequent occurrences by entering this formula into the Hide Object When field (fourth panel of the Inspector):


let ( rn = get(recordnumber) ;

  MYTABLE::Date = GetNthRecord ( MYTABLE::Date ; rn - 1 )



Problem is, it’s not working *on the FIRST record* in the list. When record 1 is selected, the Data Viewer returns “0” which is the correct result for the above formula. So the formula is evaluating as false, but FileMaker 17 is nevertheless hiding the field on the first record.


This is in 17.0.1 on two Macs (iMac and Macbook Pro, both running macOS 10.13.5). This problem did not occur in FileMaker Pro Advanced 16.0.5. I just created a brand new file and tested in both versions. Here’s a screen shot showing the same file, same data, displayed in the two files.




See that first record? The number in left column is hidden and it should not be. Now here is a capture of the same file, just opened and viewed in 16:




In 17, it ought to look like it does in 16.



* * *



NOTE: To get it to work as I wish in 17, I simply have to add a line to the Hide Object When formula:


let ( recnum = get(recordnumber) ;

   recnum > 1 and

   ACTIVITY::Date = GetNthRecord ( ACTIVITY::Date ; recnum - 1 )



In other words, don’t hide if active record is record number 1.


So it’s an easy fix. Still, it worked in 16 and earlier without the , and I can’t think of a reason it should not work in 17, too.