Hi all,
I hoping to get some help with a bit of Arcade code I'm using to calculate a value for another field.
I have a field, TargetExchange which a user populates with a date dd/mm/yyyy. I want the arcade expression to caluclate the FinacialYear field based on the date entered. I have set this up in the layers form but when I test by entering a date in the TargetExchange field I am only recieving a "None" value in the FinancialYear field. Any ideas where I have gone wrong:
var dates = $feature.TargetExchange
var financialYear = When(
dates >= 01/04/2023 && dates < 01/04/2024, "2023/2024",
dates >= 01/04/2024 && dates < 01/04/2025, "2024/2025",
dates >= 01/04/2025 && dates < 01/04/2026, "2025/2026",
dates >= 01/04/2026 && dates < 01/04/2027, "2026/2027",
dates >= 01/04/2027 && dates < 01/04/2028, "2027/2028",
dates >= 01/04/2028 && dates < 01/04/2029, "2028/2029",
dates >= 01/04/2029 && dates < 01/04/2030, "2029/2030",
"None")
return financialYear
Thanks
Lee