What is the best way to include a value from a previous entry within a repeater?
I have a repeater that pulls a list of entries from a DB which include a DATETIME.
Per entry I want to calculate the time difference with the previous entry (* in code)
Can this be done within the repeater? Or should I recall the SC and pull the previous entry using index etc.?
This is my code:
<div dmx-repeat:repeatlog="get_log.data.get_log.where('userid', userselection.value, '==')">
<div class="d-flex flex-column mb-2 bg-secondary p-1">
<div class="d-flex p-0 m-0 justify-content-between">
<p class="m-0 pt-0 pb-0 ps-0 pe-4">userid: {{userid}}</p>
<p class="text-light m-0">entry time: {{time}}</p>
<p class="text-light m-0">time since last entry: {{time}} * </p>
</div>
<p class="text-light m-0 p-0">action: {{action}}</p>
</div>
</div>