I have two tables (Locations and LocationsStatus). The first is a list of all locations and the second lists the status of that location. The status is constantly updated and I want to keep a record of status updates over time, so it is necessary to keep a second table.
Now, on a "dashboard" layout I display all locations in a portal (showing table Locations) and I want to display the status from (LocationStatus). However, if I put the field for status in the portal, it shows only the first record in the LocationStatus table related to that particular location. How do I get it to display the LAST related record in the LocationStatus table?
Can I make a portal (using LocationStatus) on top of the portal (for Locations) and sort by date and only display one record only? Or is there a more efficient way to do this? I have tried putting a portal on top of a portal, and it doesn't seem to work. It also doesn't seem very efficient. Any thoughts?
答案 0 :(得分:1)
听起来您正在显示仪表板门户中的最后一个LocationStatus。您最不可能缺少的元素是为Location
表发生与LocationStatus
表发生之间的关系分配排序顺序。
为此,请在“定义数据库”对话框中找到您的关系图,然后单击关系链接。在LocationStatus
表出现方面,您将看到排序顺序。在那里,您可以在LocationStatus
表上选择日期字段,例如创建日期,并将其设置为降序。
完成此操作后,当您从Status
表事件中提取LocationStatus
字段时,您将获得最后一个字段。
值得注意的是:FileMaker允许每个表有多个表出现次数。如果您有时希望LocationStatus
按升序排列,有时希望LocationStatus
按降序排列,则会创建LocationStatus
表的两个表出现次数,每个表都有不同的排序顺序。< / p>