2 Replies Latest reply on Apr 14, 2014 12:53 PM by paul_c

    Conditional field formatting

    paul_c

      Title

      Conditional field formatting

      Post

           Hi folks

           In a list view, FMP has a little black bar on the left side of the window that indicates the current record. I would like the fields in the current record to be a different color than others appearing in the list, in order to highlight the current record, but without entering a field.

           I was thinking of some kind of conditional statement along the lines of “If CurrentRecord=T, then color=blue, else color=white”. I can’t seem to find a way to implement this. 
            
           Any ideas on how to visually identify the current record in a list view?
            
           All suggestions appreciated.
            
           Paul

        • 1. Re: Conditional field formatting
          philmodjunk

               If you are using FileMaker 12 or newer, the Delineate option in layout setup might do what you need just by having that option selected. The layout format options then apply only to the current record.

               Another option that has a bit more flexibility is to right click the group of fields on your layout for which you want to all have the same format change if they are on the current records and select "conditional format" from the menu that pops up.

               Enter this expression:

               Get ( RecordID ) = $$RecordID

               Then specify the fill color, text color, text style... that you want when the fields are from the current record.

               Write this script:

               Set Variable [$$RecordID ; value: Get ( RecordID ) ]
               Refresh WIndow

               and use Layout Setup to specify that the OnRecordLoad script trigger perform this script.

          • 2. Re: Conditional field formatting
            paul_c

                 Worked like a charm.

                 Many thanks

                 P