1 Reply Latest reply on Oct 5, 2015 11:43 AM by raykennedy

    Showing Changes from on record to another record in list view

    raykennedy

      I have a table called OFFER and a related table called COUNTER. As you can imagine from the name these are contractual offers on a real estate deal with the table COUNTER representing numerous counters through out the process.

       

      I would like to highlight the changes from one counter record to the next in list view. Initially all I would need to do is highlight the field in the new listed record using conditional formatting if the value differs from the previous record to the same record.

       

      So here is how I am thinking the most logical method would be. I am still a FMP newbie so there maybe ways I have not considered yet. I am not sure this way is truly feasible yet but from what I can gather from what I have learned so far, it should be possible. I am not looking for the script at this point but more for opinions on whether or not this is the best approach.

       

      1. Sort Records by unique ID.
      2. Create a script that would find the most recently added record by the ID. I am assuming I can either do this by the finding the highest unique ID basically pulling the last and highest ID since these are numbers.
      3. Use the found ID, create a script that would look up the value in a specific field and with that id compare this against the value of the field in the existing record.
      4. If the values are different, use conditional formatting the highlight that field.

       

      I am think using ExecuteSQL might be the best way to approach this.

       

      I haven't attempted this yet, but before I get too far into this, would this be an efficient way for this solution or is there something more simplified in FMP that I might be missing. Again, not looking for any written scripts to do this, just opinions on whether I am on the right track to this specific solution.

       

      Thanks again for all your help.

        • 1. Re: Showing Changes from on record to another record in list view
          raykennedy

          Ok, found a an answer to my own question here. I just really can't be that easy. The developers of FMP seem to have really thought of just about everything, it just blows me away. So here is a real simple solution to my original post for those that might end up looking for this in the future. I almost made this much more complicated than I would have needed too.

           

          In the conditional formatting formula on the field you want to be highlighted -> GetNthRecord ( TABLE::FIELD_NAME ; Get ( RecordNumber ) - 1 )  ≠ TABLE::FIELD_NAME

          Hope this helps someone else.