Forum Discussion

DawnRene3's avatar
DawnRene3
Qrew Trainee
3 years ago

How to find a date from the previous record of a user in the same table

I have two tables, Coach (parent) and Meetings (child). The goal is to figure out if the next meeting is scheduled within 7 days of the last meeting the coach scheduled. So I need to somehow find the previous meeting date record for that coach and bring in that previous date to the current record so I can calculate the duration between the two.

 

For instance, on the Meeting table, Coach 1 has a meeting scheduled on June 29 (record for that coach). The meeting date record before that date for that coach is June 22. How can I pull in the meeting date for the previous meeting record on the Meeting table for that coach (June 22) to the record for the June 29 meeting? All records need to have the previous scheduled meeting on them.

 Is there a way to do this?



------------------------------
Dawn Rene
------------------------------
  • I believe that this can be done with a formula query.  But the syntax for those is tricky especially without access to the app.  I can help debug if you take a shot at it or else it may need a shorty one on one session to get it working.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        The goal of the formula query will be to it extract a text list of all of the dates for that same coach and child combination where the date was before the date on the record.

        I'm pretty sure they will come back in the sequence of Record ID number. So the one at the right side of the string will be the piece of text to hive off and convert to a date.

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------