Pull data from previous line into current line

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
I would like to create a way to have the field Due Dates be a number of days after the Due Date in the previous line.  In the picture below, the Expected Business Days for Completion is user input (and can change from Project to Project).  Additionally, the specific milestones can change from Project to Project.  I would like to make it so that the Due Date equals the previous Due Date plus the expected Business Days for completion.  

In this case, the Milestones should be made sequentially so using a relationship with some type of Record ID# - 1 might work, but I can't seem to get it to work properly.
Photo of Jessica

Jessica

  • 414 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,006 Points 50k badge 2x thumb
If you are certain that the record IDs will be sequential, then you can relate the table to itself.  Make a field with the formula [Record ID#]-1.  Call, it [Previous Record ID#].

Then make the relationship t of your table to itself based on that field on the right side of the relationship.  Then look up field(s) from the previous record to the record.
Photo of Jessica

Jessica

  • 414 Points 250 badge 2x thumb
Didn't realize you could relate a table to itself!  So much easier than the other ways I was trying to do it! Thanks Mark!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,006 Points 50k badge 2x thumb
no problem,

Ok course, that does assume that the records are being created sequentially!  So you will need to enforce that somehow.
Photo of Jessica

Jessica

  • 414 Points 250 badge 2x thumb
Is there anyway to do this if the Key field isn't the Record ID, therefore the Key field isn't sequential?  I'm trying this technique for a different project but didn't realize that the previous builder changed the Key field.

I'm assuming not, but thought I'd ask.