How would I pick the most recent referenced record from several ones in a calculation field?
Hi @dirk_s,
looking at your problem, this cannot be solved trivially using only a calculation field.
Is your criteria for “most current” based on the creation date of the remote records, or the date when the relation was made? This is important for me in order to guide you to a working solution.
Thank you in advance for providing more info &
Cheers
Tim
Yep - this is the most current created one… I should only have one relation in another calculation based on that. But there might be situations, where people will be adding another entry after a while (for requesting another issue). Thats why the “most recent” would do.
@dirk_s thanks for providing the info.
There is an easy way to access the most created one; Inside calculation fields, the token array item order will match the creation order. So you could access the “@All of title” token, which will be an array, and access the last item:
(@All of title).length ? (@All of title)[(@All of title).length - 1]
This formula will return the last item in the array (which will equal to the first one if there is only one) obviously).
Let me know if that works!
Cheers
Tim