Arcade script pass through parameters
Hi, I am trying to run an arcade script via workflow and I cannot seem to get it running. Everything looks to be valid.
This is getting a geometry picker, point, and opening a Google map URL.
Script:
// Define your x and y values
var x = $centx;
var y = $centy;
// Define the spatial reference for your x and y values (NAD83 California zone 6, EPSG:2230)
var spatialRef = SpatialReference(2230);
// Create a point geometry from the x and y values
var point = Point(x, y, spatialRef);
// Project the point geometry to WGS84
var pointWGS84 = Geometry(project(point, 4326));
// Extract the latitude and longitude from the projected point
var lat = pointWGS84.y;
var lon = pointWGS84.x;
// Create the Google Maps URL
var googleMapsURL = "https://www.google.com/maps?q=" + Text(lat) + "," + Text(lon);
// Return the URL
return googleMapsURL;
Paramters:
={"centx": $centroid1.centroid.x, "centy": $centroid1.centroid.y}
passing to a “Run Command” - system.open-url with the parameter: =$arcadeScript1.result
-
The Run Arcade Script activity does not currently support geometry operations, due to it using an older API. Your script will likely fail while calling SpatialReference(2230).
This is something that has also been asked for internally. I have raised the priority of this to investigate it during our next two-month release cycle.
0 -
Ken Lyon Hi Ken, I saw that 5.41.0 now has support for geometry operations, so this should now work? Thanks!
0 -
Hi Sean Phayakapong ,
Yes, you should be able to do this with Workflow 5.41.
0 -
Ken Lyon Hi Ken, I am trying to run this workflow in the sandbox, and it looks like some commands are not being recognized.
0
Please sign in to leave a comment.
Comments
4 comments