|
POST
|
It won't filter correctly since the variable value has to be five characters long. Try this instead var value = Left($feature.WINDEX, 5);
var cur_unitid = Filter(FeatureSetByName($datastore, "WSL", ['UNITID'], false), "Substring(UNITID, 1, 5) = @value");
... View more
08-07-2024
11:42 AM
|
0
|
5
|
1808
|
|
POST
|
The testing I've done in the Playground using the example public portal item has worked correctly. Are you sure you have the correct information for the FeatureSetByName function? What happens with this code? var cur_unitid = FeatureSetByName($datastore, "WSL", ['UNITID'], false);
return Count(cur_unitid);
... View more
08-07-2024
11:11 AM
|
0
|
1
|
2786
|
|
POST
|
Let's check whether you're getting anything back from the Filter var value = $feature.WINDEX;
var cur_unitid = Filter(FeatureSetByName($datastore, "WSL", ['UNITID'], false), "Substring(UNITID, 1, 5) = @value");
return Count(cur_unitid);
... View more
08-07-2024
09:09 AM
|
0
|
3
|
2839
|
|
POST
|
What happens with this code? I know it's not giving the maximum record, but it's just testing out the filtered result. var value = $feature.WINDEX;
var cur_unitid = Filter(FeatureSetByName($datastore, "WSL", ['UNITID'], false), "Substring(UNITID, 1, 5) = @value");
//var cur_unitid_desc = OrderBy(cur_unitid, 'UNITID DESC');
var cur_unitid_max = First(cur_unitid);
return cur_unitid_max.UNITID;
... View more
08-07-2024
08:57 AM
|
0
|
5
|
2842
|
|
POST
|
Have you tried completing the rule, adding in what you want to return?
... View more
08-07-2024
08:33 AM
|
0
|
7
|
2846
|
|
POST
|
If you like the idea, please Kudo it so it gets more visibility and a higher priority for fixing.
... View more
08-07-2024
08:01 AM
|
0
|
0
|
3190
|
|
POST
|
Your sql expression is invalid, since it doesn't understand Arcade syntax (including variables such as $feature). You can only use SQL92 syntax. An expression like this should work var value = $feature.WINDEX;
var cur_unitid = Filter(FeatureSetByName($datastore, "WSL", ['UNITID'], false), "Substring(UNITID, 1, 5) = @value");
var cur_unitid_desc = OrderBy(cur_unitid, 'UNITID DESC');
var cur_unitid_max = first(cur_unitid_desc);
... View more
08-07-2024
07:59 AM
|
0
|
9
|
2860
|
|
POST
|
Nice solution. I always forget about utilizing the power of SQL in the GroupBy
... View more
08-05-2024
12:43 PM
|
0
|
0
|
2752
|
|
POST
|
Here's one way to do it. Note that you can simply the When statement, since it evaluates each line sequentially. This means that if a value doesn't meet the first criteria (< 3.5), it moves to the second criteria between 3.5 and 5.4). Since it already has checked if it's below 3.5, it doesn't need to check that again, so it just need to check if it's below 5.5. var portalsite = Portal('https://arcgis.com');
var fs = FeatureSetByPortalItem(
portalsite,
'6ad1b5d6decd4914a3891953762d241d',
0,
[
'REPORTED_MAGNITUDE',
'MAGNITUDE_TYPE'
],
false
);
var GroupedFS = GroupBy(
fs,
['REPORTED_MAGNITUDE',
'MAGNITUDE_TYPE'],
[{name:'Total', expression: '1', statistic:'COUNT'}]
);
var s = Schema(GroupedFS)
Push(s.fields, {'name':'Range', 'alias': 'Magnitude Range', 'type': 'esriFieldTypeString'})
var temp_dict = {
fields: s['fields'],
geometryType: '',
features: []
}
for (var f in fs) {
var attrs = {}
for (var attr in f) {
attrs[attr] = f[attr]
}
attrs['Range'] = When( attrs.REPORTED_MAGNITUDE < 3.5, 'Less than 3.5',
attrs.REPORTED_MAGNITUDE < 5.5, '3.5 to 5.4',
attrs.REPORTED_MAGNITUDE <= 6.0, '5.5 to 6.0',
attrs.REPORTED_MAGNITUDE < 7, '6.1 to 6.9',
attrs.REPORTED_MAGNITUDE < 8, '7.0 to 7.9',
attrs.REPORTED_MAGNITUDE < 9, '8.0 to 8.9',
'9.0 and above')
Push(
temp_dict['features'],
{attributes: attrs}
)
}
return FeatureSet(temp_dict)
... View more
08-05-2024
12:36 PM
|
3
|
1
|
2757
|
|
POST
|
You can do this two ways. The first would be to use Arcade in the Styles tab. An expression like this would return the flightlines for the last two years. You would have to turn off the Other category in the Style options section. if(DateAdd(Now(), -2, 'years') < $feature['dateField']) return 'Recent flightlines' The other option is to use a Filter on the layer. The one drawback to that is it uses a hard-coded date instead of the flexible date (two years from today) that the Arcade code uses.
... View more
08-05-2024
12:05 PM
|
1
|
2
|
3138
|
|
IDEA
|
The API Reference for Experience Builder Developer Edition only shows the current version of the framework. Unless you download the previous versions of the documentation, there is no way to see when new classes, properties, and methods have been introduced. The documentation for these should include which version it was first added. This information is contained in the ArcGIS Maps SDK for JavaScript API Reference
... View more
08-05-2024
08:49 AM
|
4
|
1
|
662
|
|
POST
|
Note that ArcGIS Enterprise 11.1 uses Experience Builder 1.10. Since the API Reference page only contains the current version, you'd have to download the documentation to see if the JimuMapView class contains the getAllJimuLayerViews method for that version. **Update** That method first shows up in the index.js file in D:\ExperienceBuilder\ArcGISExperienceBuilder_114\client\dist\jimu-arcgis. The method isn't found in previous versions. It would be quite helpful if they would include the version that classes and methods were introduced, like they do in the ArcGIS Maps SDK for JavaScript API reference. I've added as an Idea for this.
... View more
08-05-2024
07:59 AM
|
2
|
3
|
3256
|
|
POST
|
Is there a scale restriction on the layer? Check in the layer properties to see if the layer is showing at all scales. And you can always change the split function to take into account a space after the comma. var times = Split(fTime, ', ')
... View more
07-29-2024
01:44 PM
|
0
|
0
|
1928
|
|
POST
|
I used a testing layer to try this out and it does show different symbols. I put that same code in the Label expression for more testing.
... View more
07-29-2024
01:16 PM
|
0
|
0
|
1947
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM | |
| 1 | 10-11-2023 06:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|