Return Most Recent Matching Data

Hi i am relatively new to honeycode and i would just like to ask on how to return most recent matching data. I have been working with prices of items and i need to return the most recent price of the matching item. How do you go about this? any help would be appreciated. thanks

Hello @john-80d1, welcome to the community! Happy to help you on this one. To find the most recent matching data in a table you can use the =FINDLASTROW function.

Here's a quick example I came up with the illustrate:

  1. Two tables, Prices and Products. (Take note of the two Product A's in the Prices table).

  2. In Builder, I have a picklist which lists the products and then a data cell that uses the =FINDLASTROW function of =IFERROR(FINDLASTROW(Prices,"Prices[Product]=%",$[Picklist][Product])[Price],"")

What that will do is find the most recent price from the Prices table of the product chosen in the product picklist. I have IFERROR so that when first loading the screen, if a product is not selected, it'll just be a blank price.

Here it is in action. Notice Product A is using the latest price of $4.00, instead of the previous price of $2.00.