The order is user arranged, dragging the linked record up or down.
That’s probably going to much into detail… but I’m a dealing with a junction table called Itinerary, where Trips and Days are related with each other.
- Multiple days combined form the itinerary of a Trip.
- The Days themselves are related to another table called Activities.
- A Day may have multiple Activity options arranged by a human in subjective order.
- For Day A, Activity A may be considered first, for Day B, Activity A comes second…
Other than adding yet another junction table to determine the order of activities related to a day, which I was trying to avoid to reduce complexity for the users, I cannot come up with ways to use a conditional rollup.
Okay. Thank you for the explanation.
This formula assumes that the original field is a duration field. Be sure to set the formatting options for the formula field to display the number as a duration.
IF(
{Time},
VALUE(
REGEX_EXTRACT(
ARRAYJOIN(Time, ","),
"\\d+"
)
)
)
If you want a formula for {Time2} …
IF(
COUNT({Time}) >= 2,
VALUE(
REGEX_REPLACE(
ARRAYJOIN(Time, ","),
"(\\d+,)(\\d+).*",
"$2"
)
)
)
{Time3}
IF(
COUNT({Time}) >= 3,
VALUE(
REGEX_REPLACE(
ARRAYJOIN(Time, ","),
"(\\d+,){2}(\\d+).*",
"$2"
)
)
)
{Time4}
IF(
COUNT({Time}) >= 4,
VALUE(
REGEX_REPLACE(
ARRAYJOIN(Time, ","),
"(\\d+,){3}(\\d+).*",
"$2"
)
)
)