I currently have a script written to symbolize my features based on the date they are edited (below). I want to add a line before this block that evaluates another text field, Mnt_Cdn. If Mnt_Cdn contains the value "Dead", I want the code to return the value Dead. If not, I want each record to be evaluated by the date script below.

How would I phrase this?

var days_dif = DateDiff(Now(), water_date, "days");

var result = "water status";
if (days_dif <= 14) {
    result = "Complete";
} else { (days_dif > 14) 
    result = "Needs Water" + $feature["plt_year"];
return result;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.