My colleague created the following Arcade expression and is getting the error "Requested operation could not be completed."
Any help would be greatly appreciated.
The following expression is intended to derive the “Pending (upcoming 3-week schedule) symbol label from a work order’s scheduled start date. The variables are fairly self-explanatory with the one possible exception of PUTWSL which represents the upper limit of a 3-week lookahead (today + 20 days).
It should also be apparent that the purpose of the expression is to make sure a scheduled start date is identified within the bounds of a given “today” and 20 days out from that “today”:
var SSD = $feature.ScheduledStartDate
var TodaysDate = Today
var PUTWSL = dateAdd(Today, 20, 'days')
if (SSD >= TodaysDate && SSD <= PUTWSL) {return "Pending (upcoming 3-week schedule"}
The expression reads as valid within ArcGIS’s Expression Builder and in the Arcade playground, however when attempting to execute it, GIS states that the “Requested operation could not be completed.”
Solved! Go to Solution.
You're setting "TodaysDate" to the function "Today", as opposed to its output.
Similarly, in your PUTWSL variable, you're using the function itself as a parameter.
Easy enough of a fix, just put "()" after "Today".
You're setting "TodaysDate" to the function "Today", as opposed to its output.
Similarly, in your PUTWSL variable, you're using the function itself as a parameter.
Easy enough of a fix, just put "()" after "Today".
Thank you so much! That fixed it. Really appreciate the help!