I'm trying to capture the record ID of the previous activity in an activity chain that is just below the most recent for a specific unit ID. Here's my query in a formula multi-select text field:
// 58 Completed DateTime, 24 Unit ID, 149 Task Rank
var text Query = "{58.BF.'" & [Completed DateTime] & "'} AND {58.BF.'" & [Inventory Unit - Latest Completed DateTime] & "'} AND {24.EX.'" & [Inventory Unit - Unit ID] & "'} AND {149.LTE.'" & [Task Rank For Unit] & "'}";
GetFieldValues(GetRecords($Query), 3) // P1
You'll see above, that I'm looking for the before datetime of the current record, and before datetime of a lookup field for the latest record. I'm also constraining the search to the unit ID and the previous rank (I added a formula query to rank all activities in descending order). My question is, how do I get just the one previous value and exclude anything prior to that?
I've attached an image of two Units and their activities. You'll see that the top activity for each unit (the latest activity) displays all activity record IDs prior, but I only want to show the previous activity record ID and nothing before that.
------------------------------
AR
------------------------------
Sign up
Already have an account? Login
Login to the community
Login with Quickbase US – quickbase.com Login with Quickbase EU – quickbase.eu
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.