How do I write a formula to look at the value of a field for a related object with the max record id?

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

I have a parent table (Products) and a child table (Samples). The (Samples) table has a field called "Sample Status". I am trying to write a formula for a filed in the (Products) table that looks at the "Sample Status" of the related sample with the highest record id and if the value = x, return value y. 

I created a summary on the (Product) table of the Max Record ID, but I am not sure how to write the formula...

If("Sample Status" = "x" for [Max Recor ID #] in table (Samples) then "y")

Photo of Nicholas

Nicholas

  • 0 Points

Posted 3 years ago

  • 0
  • 1
In your case the easiest way is this

You already have the Max Record ID.
Duplicate that field but filter it where [Status] = X

So now the Parent can do the Formula

IF([Max rec ID] = [Max Record ID of Status X], "Say Y")
Photo of Nicholas

Nicholas

  • 0 Points
Thx this worked great!
:)