I’m after ideas / methods / hints to simplify the following App Formula.
The result I want is a list of nearest 5 row references from the WAITING_LIST table where the CONTAINS criteria are met for each row_ref.
TIA
The formula below works - but seems like it’s the long way round.
Can I simplify the app formula that creates the list of row_refs?
LIST(
INDEX(
ORDERBY(
FILTER(
"WAITING_LIST",
CONTAINS([Related SECTIONs][_sectionType],[_suggestedSection])
),
DISTANCE(
[_memberPostcode_LatLong],
[groupLatLong]
)
),1),
INDEX(
ORDERBY(
FILTER(
"WAITING_LIST",
CONTAINS([Related SECTIONs][_sectionType],[_suggestedSection])
),
DISTANCE(
[_memberPostcode_LatLong],
[groupLatLong]
)
),2),
INDEX(
ORDERBY(
FILTER(
"WAITING_LIST",
CONTAINS([Related SECTIONs][_sectionType],[_suggestedSection])
),
DISTANCE(
[_memberPostcode_LatLong],
[groupLatLong]
)
),3),
INDEX(
ORDERBY(
FILTER(
"WAITING_LIST",
CONTAINS([Related SECTIONs][_sectionType],[_suggestedSection])
),
DISTANCE(
[_memberPostcode_LatLong],
[groupLatLong]
)
),4),
INDEX(
ORDERBY(
FILTER(
"WAITING_LIST",
CONTAINS([Related SECTIONs][_sectionType],[_suggestedSection])
),
DISTANCE(
[_memberPostcode_LatLong],
[groupLatLong]
)
),5)
)
