Ah, and the spatial join doesn't update, didn't know that. OK, then let's try doing it in Dynamic Text and Arcade.
I've tried using Intersects() and the $map and $datastore profiles to lookup my plantation layer, but my understanding is the dynamic text doesn't recognise the $map profile and the $datastore profile only returns layers in a feature service.
Correct, the Arcade Layout profile doesn't recognize the $map global (which is a bit weird, because you specify the map frame you want to extract the table attribute from). But $datastore will work as long as Plantations and Lots are in the same database / feature service.
This will list all Lots numbers (TextField1 in my layer) intersected by Plantations (note that you insert a table attribute for the plantation layer):
var lots = FeaturesetByName($datastore, "Lots")
var i_lots = Intersects($feature, lots)
var lot_names = []
for(var lot in i_lots) {
Push(lot_names, lot.TextField1)
}
return Concatenate(lot_names, ", ")
This works fine if you have only one plantation:
With multiple plantations on different lots, the lot numbers will be unsorted:
With multiple plantations on the same lots, the lot numbers will be duplicated:
Have a great day!
Johannes