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?
@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?
@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.
@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.
@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!!
User | Count |
---|---|
16 | |
10 | |
8 | |
5 | |
5 |