1 Reply Latest reply on Sep 26, 2013 1:33 PM by philmodjunk

    Highlighted Text in field upon new record creation

    AH

      Title

      Highlighted Text in field upon new record creation

      Post

           I'm using FMP (10 & 11) to manage my client database for my band. Each client will have a record of every performance we do. Often, there will be repeat performances, so I simply duplicate the previous record, remove all of unncessary information, and then continue to modify the new record until the gig is fulfilled... at which point, I will repeat the process and make a new record.

           I've recently decided that using scripts can speed up the process and erase specified fields after I've created the new record. I'd like to take it one step further and create a button or script that will create the new record and erase the old data automatically.

           Here's the thing... because I have six other people working on the same database, I'd like to have a visual way of indicating which information is carried over from the old record by means of a highlighted box or coloured text. An example of this would be carrying over the amount charged from the previous gig. Then, once there is an interaction with that particular field, then the highlight/decorated text will revert back to normal (indicating that the information is now current and not carried over from the previous record).

           Does this make sense? Sorry... it's hard to explain without going into excessive detail.

        • 1. Re: Highlighted Text in field upon new record creation
          philmodjunk

               If your records have an auto-entered serial number field, you can use that field in a self-join relationship to link the new record to the record that produced it through replication.

               Then conditional format expressions can high light fields in the new record that exactly match fields in the originating record.

               Is that close enough to what you need here?

               You might set up your relationship and duplication scripts like this:

               Gigs::_fkPreviousGigID = Gigs|Previous::__pkGigID

               The script:

               Set Variable [$PrevID ; value: Gigs::__pkGigID ]
               Duplicate Record
               Set Field [Gigs::_fkPReviousID ; $PrevID ]

               Conditional formatting example. Say you have a field named Gigs::amount

               A conditional format expression such as:

               Gigs::amount = Gigs|Previous::amount

               could specify a fill color and the Gigs::amount field will then be highlighted until someone edits the amount field to an amount that does not match that found in the originating record.