Arcade Expression Requested operation could not be completed

411
2
Jump to solution
04-11-2022 11:12 AM
GarrettJohnson
New Contributor III

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.”

 

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

You're setting "TodaysDate" to the function "Today", as opposed to its output.

jcarlson_0-1649700961492.png

Similarly, in your PUTWSL variable, you're using the function itself as a parameter.

Easy enough of a fix, just put "()" after "Today".

- Josh Carlson
Kendall County GIS

View solution in original post

2 Replies
jcarlson
MVP Esteemed Contributor

You're setting "TodaysDate" to the function "Today", as opposed to its output.

jcarlson_0-1649700961492.png

Similarly, in your PUTWSL variable, you're using the function itself as a parameter.

Easy enough of a fix, just put "()" after "Today".

- Josh Carlson
Kendall County GIS
GarrettJohnson
New Contributor III

Thank you so much!  That fixed it. Really appreciate the help!

0 Kudos