Search code examples
google-app-maker

Showing related data in a list


I am building a page in Google AppMaker and cannot retrieve the latest record of the related data that was submitted.
In my app: I have multiple wounds, each with many inspection dates. I want to be able to list each wound, and pull up the most recent measurements (latest Length, latest Width, and latest depth) Here is the Visual. I have tried advanced datasource options and did not get anywhere. I was hoping to use as little app script as possible. I thought this would be easily retrievable with the bult-in widgets (I can easily do this in spreadsheet using Vlookup... but I don't know what the equivalent would be in appmaker) Any help would be appreciated, Thanks.


Solution

  • If you have a field that can be used as a criterion for getting the latest record, say CreationDate, then you can specify a sorting option in the relation settings.

    See sample One-to-many relation setting with sorting option (screen-shot)