Forum Discussion

SherryBlackbur1's avatar
Qrew Trainee
2 years ago

Get field value from another record based on a date 4 weeks in the past

Case: Weight loss program needs to auto-calculate a 4-week weight loss value.

I need to be able to lookup the value in "Today's Weight" field for the same Patient's weekly tracker record dated 4 weeks prior. Here's the relationship between the tables. The recursive relationship looks up the previous week's weight to calculate the weight loss since last week. I just need the 4 week formula. Thanks in advance.

Sherry Blackburn
Sr. Applications Systems Analyst (Quickbase at PeaceHealth)

1 Reply

  • I am just on my phone now, so I can't see your relationship diagram very well, but if, in fact, you say you have a recursive relationship where each Weight in  knows the value of the previous weigh in and it seems to me that if you are very conscientious and planful about your field naming you could then do a look up of the previous weeks way in and that would end up being the second previous weeks weigh  in and then you just keep going like that and you can hop your way back.

    If this was a traditional grandparent parent child type relationship with multiple tables, you would just do the look up  down and down and down. So it's the same thing except with a recursive relationship. 

    The alternative, of course us to get fancier with a Formula  Query, but that's probably not necessary.

    Mark Shnier (Your Quickbase Coach)