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
|
1493
|
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
|
519
|
POST
|
Ah, ok. I’m used to Flow Control being a name for a proprietary technology, like it is in the IBM Maximo world.
... View more
03-06-2022
08:15 PM
|
0
|
0
|
546
|
IDEA
|
Could ESRI consider adding a blurb to the docs somewhere that explains when zero-based numbering is used vs. one-based numbering? For example, if I understand correctly, zero-based numbering is a software thing (at least, software that’s built on top of C++). It’s used for: - ArcGIS Pro geometry: part and vertex numbers - ArcObjects in general - ArcPy/Python, Arcade (i.e. December is month 11), and other procedural languages used in ArcGIS. Whereas one-based numbering is used in the database: - All databases supported by ArcGIS (including their procedural languages like PL/SQL) - Spatial types like SDE.ST_GEOMETRY Reason: For non-computer scientists, it can be confusing to switch back and forth between the two numbering systems, without having background info about why. For example, I finally got used to scripting in ArcGIS using zero-based numbering, but when I started using the SDE.ST_GEOMETRY db type, I didn’t understand why ESRI would have switched to one-based numbering. It seemed inconsistent. I later realized that it’s a database convention, not an ArcGIS convention. A bit of info in the docs might help avoid confusion. Even though it’s not specific to the ArcGIS world, it’s still something that GIS practitioners can trip over.
... View more
03-06-2022
08:04 PM
|
2
|
1
|
608
|
POST
|
The Arcade developer docs talk about "increment operators": The increment/decrement by one operators have both a pre and post versions that differ in what they return. The pre increment version adds one to the variable and returns the new value while the post increment adds one and then returns the initial value of the variable. //Pre increment example var x=10 ++x // x is now 11 and the value 11 is returned //Post increment example var x=10 x++ // x is now 11 but the value of 10 is returned. Question: What is an example of using x++ in an Arcade expression? (outside of a for loop) I don't think I understand why we'd want to use it: "x is now 11 but the value of 10 is returned". Why would we want to return the "initial value of the variable" (10)? Related: Why avoid increment ("++") and decrement ("--") operators in JavaScript? Thanks!
... View more
03-06-2022
03:20 PM
|
0
|
1
|
4242
|
IDEA
|
The FeatureSets section in Arcade developer documentation seems a bit misleading. It suggests that a FC needs to be in a map service or feature service in order to use it as a related FC in an Arcade expression: FeatureSets allow you to access features from feature service layers within the map or feature service. If I understand correctly, a FC doesn't need to be in a map or feature service in order to use it as a related FC in Arcade: Arcade: Use related FCs without needing feature service Could the developer documentation be changed to make the above more obvious? Thanks!
... View more
03-06-2022
02:32 PM
|
1
|
0
|
537
|
POST
|
For cases where we don’t need to update paths, I wonder if something simpler could work instead: for (var part in Geometry($feature).paths) { var line_part = Geometry($feature).paths[part] I’m not sure if I understood that correctly though. Source: ESRI’s GitHub of Arcade expressions - CreatePointsAlongLine Related: Are Arcade geometry subtypes immutable? (i.e. point, polyline, polygon)
... View more
03-05-2022
10:45 PM
|
0
|
0
|
2450
|
POST
|
I'm hoping to use related FCs in calculation attribute rules. For example, use an attribute rule in FC-A to update the features in FC-B. Question: In order to use related FCs in attribute rules, do we need to publish the FC as a feature service?
... View more
03-05-2022
09:35 PM
|
0
|
3
|
799
|
IDEA
|
It looks like the Arcade developer docs might be out of date: In future releases, other geometry functions may be added allowing you to calculate areas and lengths, and perform simple overlay operations in more complex expressions. I think that "future" functionality has already been released. Should the developer docs be updated?
... View more
03-05-2022
05:49 PM
|
4
|
1
|
498
|
POST
|
The Arcade docs have a blurb about flow control: Arcade is a portable, lightweight, and secure expression language written for use in the ArcGIS platform. Like other expression languages, it can perform mathematical calculations, manipulate text, and evaluate logical statements. It also supports multi-statement expressions, variables, and flow control statements. What is flow control? I searched the web for "arcgis" "flow control", but didn't find much. Thanks.
... View more
03-05-2022
05:43 PM
|
0
|
3
|
615
|
IDEA
|
Edited: Could the line numbers in the Expression Builder be turned on by default? - I can't think of any scenarios where having them on by default would cause problems. - It's not obvious to everyone that the line numbers functionality exists...since they're hidden away in the right click menu. Old idea: Could Esri consider adding line numbers to the code window in Expression Builder?
... View more
03-05-2022
12:33 AM
|
14
|
3
|
1355
|
POST
|
Regarding the ArcGIS Diagnostic Monitor (ArcMon) tool in ArcGIS Pro: Is there a way to view the output from Arcade console() messages in ArcMon somewhere? console("testing123") Output: testing123 I did some testing, including: Enabling the Debug checkbox Searched for my console() text in the logs: testing123 But I couldn't find that console() text anywhere.
... View more
03-05-2022
12:00 AM
|
0
|
0
|
635
|
IDEA
|
@KoryKramer Thanks! I didn't know about ArcGIS Pro’s ArcMon tool. That will be useful. I wonder if what we need is the Console Messages window...but visible right in ArcGIS Pro as a side-pane window. Or something like that. So we could see the console() messages as we test. Reasons: Console() messages don't seem to show up in the ArcMon tool. Even with the Debug checkbox enabled. Would be convenient to see a simple window -- specifically showing console() messages. But I'm a novice, so I'm open to input. Others might have better ideas? @KimGarbade @jcarlson @JohannesLindner
... View more
03-04-2022
11:39 PM
|
0
|
0
|
1294
|
IDEA
|
Could Esri consider supporting the JavaScript (for...of) statement in Arcade? for (var path of paths) { for (var point of path) { JavaScript For Of Currently, only the (for...in) statement is supported: Arcade - For loops Arcade: for (var path of paths)
... View more
03-04-2022
10:34 PM
|
0
|
0
|
230
|
Title | Kudos | Posted |
---|---|---|
1 | 09-18-2024 06:14 AM | |
1 | 16 hours ago | |
1 | 05-08-2023 07:41 AM | |
1 | Monday | |
1 | 2 weeks ago |