Forum Discussion

RubyKapil2's avatar
RubyKapil2
Qrew Captain
4 years ago

Show most recent entry in Log Edit field that uses Date and Time

I want to parse out the most recent entry from a Text field. Field is set to use Date and Time.
a. One version with Date and Time and User and the most recent comment
b. Another version with just the most recent comment.

I used the Trim function (shared by Mark Shnier) which works.
However, I also want to take into account the time, so if multiple entries made with the same date, it will pull the most recent "timed" entry.

Thanks.

------------------------------
Ruby Kapil
rubykapil@wi-finity.com
Wi-Finity, Inc
------------------------------

2 Replies

  • Here are some formulas you can use. These formulas all assume that the append updates are being done at the bottom ... ie added to the end and not at the beginning. 

    Parsing Append Only Fields

    so... if you have a text field set to Log Changes where the new entries act in the default manner which is to be at the bottom of the updates, here are some formuals to use to parse out the values from the most recent entry. I am also assuming that you are logging the date and not the date and time.

    Most recent value (formula text field type)

    Trim(Right([my update field],"]"))

    Date of most recent update (this needs to be a formula date field)

    ToDate(Left(Right([my update field],"["),9))

    Who did the most recent update (formula text field type)

    Trim(NotLeft(Left(Right([my update field],"["),"]"),9))

    Parse out the date and time of the update

    var text DateAndTime = Left(Right([append only with date /time],"["),18);
    var date TheDate = ToDate(Left($DateAndTime," "));
    var timeofday TheTime = ToTimeOfDay(NotLeft($DateAndTime,9));


    ToTimestamp ($TheDate, $TheTime)

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
  • DonLarson's avatar
    DonLarson
    Qrew Commander
    Ruby,

    Consider moving away from the Text field to a Child Table of "Notes."   

    Every entry is a new record and makes the reporting on them much easier.   Log Edits on a Text Field is quick to set up but I have found over time I am sorry that I did not take the extra effort to put another table into the application.


    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------