Hello! I wrote a simple script to classify incoming Applications by Fiscal Year. Currently 2023 & 2024 are grouped together. I have data for 2023, 2024 and 2025 however we expect more data for 2026.
The problem: I have selected symbology for the data I have (23/24 = green circle size 20, 2025 = blue circle size 20) however I would like to predefine 2026 = orange circle size 20. Currently someone will need to manually update the symbology after some 2026 data has been added.
Is it possible to establish the attribute's icon, color and size within the Change Style Expression? I included the current script below:
var ApplicationDate = $feature.ApplicationDate // Application Date in Question
var FY23Start = Date(2023,6,1) // July 1st, 2023
var FY24End = Date(2025,5,30) // June 30th, 2025
var FY25Start = Date(2025,6,1) // July 1st, 2025
var FY25End = Date(2026,5,30) // June 30th, 2026
var FY26Start = Date(2026,6,1) // July 1st, 2026
var FY26End = Date(2027,5,30) // June 30th, 2027
If (ApplicationDate >= FY23Start && ApplicationDate <= FY24End) {
return "Application from FY2023 or FY2024"
} else {
If (ApplicationDate >= FY25Start && ApplicationDate <= FY25End) {
return "Application from FY2025"
} else {
IF (ApplicationDate >= FY26Start && ApplicationDate <= FY26End) {
return "Application from FY2026"
} else {
return "Application not within specified date range"
}
}
}