I have a referenced table question. I have ...

I have a referenced table question.

I have an app that has lead information in it. I have another table that has tasks that reference the organization in the leads table. The tasks are timestamped, but the task table contains multiple tasks for each organization.

What I want to do is add a column to the leads table that contains the most recent task timestamp from the tasks table. This is so I can have this as a column for sorting in my leads table view.

Iโ€™ve tried several things and canโ€™t quite figure out the best way to do this. Does anyone have advice?

0 10 360
  • UX
10 REPLIES 10

tony1
New Member

@Nathan_Stufflebean Here are a couple of examples that should help.

Most recent row (single table): appsheet.com - Most Recent Value - Initialize forms with most recent value

Most recent child row (with table refs): https://www.appsheet.com/samples/This-app-shows-how-to-get-the-most-recent-related-row-for-a-table?a... Most Recent Value - Initialize forms with most recent value appsheet.com

Thank you so much! Iโ€™m going to try this and see if I can get it to work within my app.

What if I want it to display the most recent timestamp instead of the child name?

tony1
New Member

@Nathan_Stufflebean Follow the recipe in those apps. You should end up with a virtual column referencing the most recent row. Make that virtual column hidden, then create a new virtual column with a dereference formula like [Most Recent Row].[Your Timestamp Column].

help.appsheet.com - Dereferences Dereferences help.appsheet.com

Iโ€™m not getting any errors, but it also doesnโ€™t seem to be working.

tony1
New Member

@Nathan_Stufflebean Can you give more information about how itโ€™s not working? Hereโ€™s info about how you can troubleshoot app formulas: help.appsheet.com - Expression Assistant and Expression Builder Expression Assistant and Expression Builder help.appsheet.com

All expressions work and it does grab the latest task. However, itโ€™s not automatic. If a new task is created it doesnโ€™t update the field unless the lead record is resaved. Then it will recalculate. I need it to always display the most recent task timestamp.

tony1
New Member

@Nathan_Stufflebean Are you putting the formula in a virtual column, or a non-virtual column? help.appsheet.com - Virtual Columns

Virtual columns are recomputed automatically. Non-virtual columns with app formulas will only be recomputed when theyโ€™re edited. Virtual Columns help.appsheet.com

Ah, I assume that is my problem. Let me

adjust.

Awesome! I think I have it working now. Well, you have it working. Thanks!!

Top Labels in this Space