|
POST
|
The Arcade developer Attribute Rule Calculation docs say: When the attribute rule is evaluated for a dataset, the return value for the expression is cast to the field type of the output value. It is best practice to handle casting within the script for full control of casting behavior to Number, Date, or Text return types. It sounds like that second sentence is implying that we only need to cast datatypes to the output type when the datatype is Number, Date, or Text. Is that correct? For example, for geometries, would we return Polyline(my_dictionary) -- and then rely on Arcade to automatically cast that polyline to a geometry? Or is the fact that Polyline is a subtype of the Geometry type mean that Polyline is technically already a geometry?
... View more
03-08-2022
05:23 PM
|
0
|
1
|
972
|
|
POST
|
Lol. I posted a similar question just now: Arcade: Alias profile It looks like the Arcade GitHub is empty for Aliases. I was hoping to see an example there.
... View more
03-08-2022
04:55 PM
|
0
|
0
|
1275
|
|
POST
|
The Arcade developer docs mention the "Alias" profile: The alias profile allows the map author to write an expression to evaluate a numeric value and return a text alias representing that value. When the alias is needed, the script will be evaluated. It will be passed the value for which an alias is desired. It is expected that the script returns a text value, comprising the alias to be shown. Globals Variable Name Type Description $value Number The numeric value for which a text alias is desired. Return types Text It's not clear to me when/why the Alias profile would be used. What would be an example use case for Alias? Edit: This post is a duplicate of: What/where is the Alias profile for Arcade?
... View more
03-08-2022
04:50 PM
|
0
|
0
|
765
|
|
IDEA
|
Regarding the Arcade developer documentation: I find the description of the Polyline paths array to be confusing: "A three-dimensional array of numbers. The inner-most array contains the x,y,z,m coordinates of a single point. The second dimension contains additional points making up a line segment. The third dimension allows the polyline to have multiple segments." Could that blurb be re-worded so that it's more intuitive? Something like this? - An outer array to hold the multi-parts: [multiple parts here] - A middle array of one or more multi-parts: [multiple parts: [p0], [p1] ] - An inner array that is the sets of vertices: [multiple parts: [p0: [X,Y], [X,Y], [X,Y] ], [p:1 [X,Y], [X,Y] ] ] I think a more intuitive explanation would be helpful. I've heard from a few different people that said they also found the existing wording confusing. Related info here: https://community.esri.com/t5/arcgis-pro-questions/arcade-what-does-quot-zero-dimensional-geometry/m-p/1151925/highlight/true#M52550
... View more
03-08-2022
02:22 PM
|
0
|
1
|
1607
|
|
POST
|
Thanks. And I suppose the dimensions of the geometry are not to be confused with the dimensions of an array? Polyline A polyline is a one-dimensional geometry. This may be created by passing JSON in the format described below to the Polyline() function or by passing a polyline feature to the Geometry() function. Property Type Description type text Indicates the geometry type. This value is always polyline. paths number[][][] A three-dimensional array of numbers. The inner-most array contains the x,y,z,m coordinates of a single point. The second dimension contains additional points making up a line segment. The third dimension allows the polyline to have multiple segments. I find the description of the paths array confusing. I wonder if an explanation like this would be better (although, it is similar to Esri's explanation): - An outer array to hold the multi-parts. [multiple parts here] - A middle array of one or more multi-parts.[multiple parts: [p0] [p1] ] - An inner array that is the sets of vertices: [multiple parts: [p0: [X,Y], [X,Y], [X,Y] ] [p:1 [X,Y], [X,Y] ] ] That explanation seems more intuitive to me. Related: Idea - Improve Arcade polyline paths array documentation
... View more
03-08-2022
01:40 PM
|
0
|
1
|
5232
|
|
IDEA
|
(edited) The SDE.GDB_ITEMS_VW view in Oracle GDBs is relatively slow due to the calculated columns: - sde.sdexmltotext(d1.xml_doc) AS definition, - sde.sdexmltotext(d2.xml_doc) AS documentation, - sde.sdexmltotext(d3.xml_doc) AS iteminfo, Could Esri consider precomputing the calculated columns in that view — especially the DEFINITION field? I imagine there would be a few different ways it could be done: - Materialized view - Function-based index - Trigger to populate a field in a table - Other Oracle mechanisms? We'd do it ourselves in our GDB, but we prefer not to modify the objects in the SDE owner...for multiple reasons, such as: it adds complexity to GDB upgrades. I would think the materialized view option would be especially appealing to Esri. It would be fairly easy to convert the existing view to a materialized view. And the change wouldn't compromise any existing dependencies, since the view's name would stay the same. Esri could use the fast refresh/materialized view logs option...which would mean the materialized view would update in real time (which I imagine is necessary). Similarly, function-based indexes would be a low-impact, easy, real-time option too.
... View more
03-08-2022
12:11 PM
|
4
|
0
|
822
|
|
POST
|
From the Arcade developer docs: Type System - Point: A point is a zero-dimensional geometry. What is meant by "zero-dimensional geometry"? If anything, I would have thought that X, Y, Z would be the dimensions of geometry. How can there be zero dimensions?
... View more
03-08-2022
12:40 AM
|
0
|
7
|
5299
|
|
POST
|
Is there a way to use a related database view in Arcade? (for a calculation attribute rule in the parent FC) If so, are there any requirements, such as registering the view with the geodatabase? Thanks.
... View more
03-07-2022
09:54 PM
|
0
|
1
|
707
|
|
POST
|
Thanks for your help Mike and Kim. Your replies helped a lot. As Mike said: var parent_class = FeatureSetByName($datastore, "Facilities", ["globalid"], false); FeatureSetByName FeatureSet Global Variable: $datastore Idea: Arcade Documentation: Arcade FeatureSets / related FCs And this will probably be useful: $editcontext.editType Text Indicates whether the edit event is INSERT, UPDATE, DELETE, or NA (not applicable). Identify the editing event trigger such as insert, update, or delete
... View more
03-07-2022
09:41 PM
|
0
|
0
|
1655
|
|
POST
|
Thanks! I submitted an idea about improving the docs here: Arcade Documentation: Joined Tables
... View more
03-07-2022
08:36 AM
|
0
|
0
|
1704
|
|
IDEA
|
Could Esri consider improving the Arcade developer documentation on joined tables? How do I reference data from a joined table? You can reference attribute data from a joined table using the square bracket syntax for referencing field names: $feature["joinKey.fieldName"]. // data from a joined table
var demVotes2016 = $feature["COUNTY_ID.VOTED_DEM_2016"];
var demVotes2012 = $feature["COUNTY_ID.VOTED_DEM_2012"];
// returns % change in votes from 2012 to 2016
Round( ( ( demVotes2016 - demVotes2012 ) / demVotes2012 ) * 100, 2); That blurb seems misleading. More info here: Arcade joined tables: joinKey Thanks.
... View more
03-07-2022
08:35 AM
|
0
|
1
|
1285
|
|
IDEA
|
@KoryKramer Sounds good. Feel free to close this idea.
... View more
03-07-2022
06:34 AM
|
0
|
0
|
2467
|
|
POST
|
The Arcade developer FAQ says this: How do I reference data from a joined table? You can reference attribute data from a joined table using the square bracket syntax for referencing field names: $feature["joinKey.fieldName"]. // data from a joined table
var demVotes2016 = $feature["COUNTY_ID.VOTED_DEM_2016"];
var demVotes2012 = $feature["COUNTY_ID.VOTED_DEM_2012"];
// returns % change in votes from 2012 to 2016
Round( ( ( demVotes2016 - demVotes2012 ) / demVotes2012 ) * 100, 2); Questions: 1. Where does the joinKey come from? Is it using a relationship class? Or an in-map join in a project file? 2. Does it only work if the two join fields have the same name? 3. How is this related to FeatureSets? 4. Where can we find more info?
... View more
03-07-2022
05:57 AM
|
0
|
2
|
1731
|
|
IDEA
|
I wonder if it’s consistent with JavaScript, or if Esri diverged and did it their own way?
... View more
03-07-2022
04:34 AM
|
0
|
0
|
3601
|
|
POST
|
How does Arcade handle nulls? Examples: Can we do math on nulls? 1 + null = ? Can we concatenate nulls? "foo" + null = ? How does aggregating on nulls work? Average($layer, "flag_1") If there are nulls in the "flag_1" field, will they be included in the average's count? Does null equal null? Does null not equal null? Is there anything else about nulls that we should be aware of? Thanks.
... View more
03-06-2022
11:48 PM
|
0
|
1
|
1083
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-20-2026 02:12 PM | |
| 1 | 03-19-2026 11:42 AM | |
| 1 | 06-03-2026 04:02 AM | |
| 1 | 03-18-2026 07:08 PM | |
| 2 | 2 weeks ago |