Hello everyone while making a map with Arcade, i've encountered a problem
I have a DB with these fields:
city, year, pop2017, pop2018, pop2019...
Where pop{...} are fields that contain the population for the selected year (so pop2017 is the population of this city in 2017), many project work on this DB but each year, we need to make new maps selecting the right year;
I tried to make this a bit more automatized by using this:
`Current pop: ${$feature[`pop${$feature.year}`]}`
But, by doning this, it return me a NaN, after searching the root of this problem, i notice that i needed first to "load" these fields like so:
//$feature.year is currently at 2022
Console($feature.pop2022) // Here i force this field to load
$feature[`pop${$feature.year}`] //Here i call it
But, i'm now back at the same point, each year, i'll need to manually add the $feature.pop.... to force it to load
Does anyone know if there is a clever way to do this ? Like a way to force features fields to load without writing by hand a call on this field ?
Please guys, help me