How do I create a formula to show the latest entry from multiple fields?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have inventory that is moved from location to location. I want to be able to see where it has been so I've created several fields [Location 1], [Location 2], [Location 3], and [Location 4]. I also have a field called [Current Location]. How do I write the formula for [Current Location] so that it shows where the inventory is right now? (Something along the lines of "If location 4 is blank, then location 3, if location 3 is blank, then location 2, if location 2 is blank then location 1.)

Photo of Andrea

Andrea

  • 90 Points 75 badge 2x thumb

Posted 4 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 65,310 Points 50k badge 2x thumb
Try this

If(
Trim([Location 4]) <> ""' [Location 4],
Trim([Location 3]) <> ""' [Location 3],
Trim([Location 2]) <> ""' [Location 2],
Trim([Location 1]) <> ""' [Location 1])
Photo of Andrea

Andrea

  • 90 Points 75 badge 2x thumb
Perfect, thank you! I changed the last apostrophe to a comma and this works exactly as I needed.