|
POST
|
If the text contains a "<" or "&", these special characters break formatting tags. You have to replace them with "<" and "&". This line replaces both (and uses template literals) `<UND>${Replace(Replace($feature.ParcelID, "&", "&"), "<", "<")}</UND>`
... View more
02-03-2026
09:27 AM
|
1
|
2
|
550
|
|
POST
|
You should be filtering the entire dataset, not the feature in line 1
... View more
02-03-2026
07:27 AM
|
2
|
0
|
260
|
|
POST
|
Start with the Arcade documentation, which contains lots of information about how to use the language, especially in the Language features section.
... View more
01-30-2026
05:59 AM
|
0
|
0
|
376
|
|
POST
|
Thanks for pointing that out. I did leave off the Expects function at the top of the code. All you need to do is add this as the first line Expects($feature, "*");
... View more
01-29-2026
11:43 AM
|
0
|
1
|
272
|
|
POST
|
Unfortunately, for performance reasons, the Labeling profile doesn't give you access to the entire dataset, just an individual feature, so I don't think you'd be able to label just the most recent feature.
... View more
01-29-2026
06:35 AM
|
0
|
0
|
184
|
|
POST
|
To maintain the order of the fields, you have to get the schema of the feature. Try this code, which returns the field alias and domain name (if the field has a domain) var fields = Schema($feature).fields;
var fieldInfos = [];
var attributes = {};
var excludeFields = [
"OBJECTID",
"EditDate",
"Creator",
"GlobalID",
"CreationDate",
"Editor"
];
for (var field of fields) {
var key = field.alias;
var value = DomainName($feature, field.name);
if (!IsEmpty(value) && value != "" && IndexOf(excludeFields, key) == -1) {
Push(fieldInfos, { fieldName: key });
attributes[key] = value;
}
}
return { type: "fields", fieldInfos: fieldInfos, attributes: attributes };
... View more
01-29-2026
06:10 AM
|
1
|
3
|
289
|
|
POST
|
It also works when I join it with a table with domains
... View more
01-28-2026
08:15 AM
|
0
|
1
|
250
|
|
POST
|
Try this script function getFilteredFeatureSet(ds) {
var result = ds.layer;
var queryParams = ds.queryParams;
// Leave selection logic unchanged
if (!IsEmpty(queryParams.where)) {
result = Filter(result, queryParams.where);
}
if (!IsEmpty(queryParams.geometry)) {
result = Intersects(result, queryParams.geometry);
}
// Filter to critical only
result = Filter(result, "criticalCustomer = 1");
return result;
}
// ds must be whatever Experience Builder is passing you for the selected-meter datasource.
// Keep your existing ds line here (do not change it).
// Example (yours will differ): var ds = $datastore["Meters"].asDynamicLayer();
var ds =
var fs = getFilteredFeatureSet(ds);
return Count(fs); To get the correct layer, after you've connected the text box to your data, click edit, then the Arcade button. Put your cursor on line 24 after the =. On the side of the script editor is the Profile variable button. Click it, then click the arrow on right side of the $datasources line. Click the first line below that which has your datasource ID to add it to your script.
... View more
01-23-2026
10:38 AM
|
1
|
1
|
424
|
|
POST
|
Are you testing this on your own account? If it's on your own account, a quirk in the app is that you have permission to edit anything in what you own, regardless of whether you've set a field to be uneditable. I have set up a testing account with different permissions to check for this.
... View more
01-20-2026
09:10 AM
|
2
|
1
|
397
|
|
POST
|
This code should work. You'll have to replace the datasource ID with your own and supply the correct field name in the sql statement. var ds = $dataSources["dataSource_1-19123c9cd36-layer-2"];
var layer = $dataSources["dataSource_1-19123c9cd36-layer-2"].layer;
var sql = "yourField = value" //or "yourField = 'value'" if it's a string
var filteredLayer = Filter(layer, sql)
var output = Count(filteredLayer)
return {
value: output,
text: {
// size: 14,
// color: 'rgb(0, 0, 255)',
// bold: true,
// italic: false,
// underline: false,
// strike: false
},
}; This is what it looks like in while editing the Text widget. "Feature Count" is the name of the Arcade script. And this is what the final result is
... View more
01-20-2026
07:08 AM
|
1
|
0
|
479
|
|
POST
|
The problem you're running into is the comments attribute in your feature is a text string and not JSON text. "[{'date': '2025-12-29', 'comment': 'Code Enforcement has received your service request (#CRM-25001496).', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'This issue was recategorized from Unsafe Sidewalks or Rights-Of-Way to Encampment Activity.', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': '7 day notice posted. Reporting party has been notified. ', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'CRM-25001496 on CentralSquare Community Development abandoned and now managed on SeeClickFix due to recategorization.', 'visibility': 'Internal'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals', 'visibility': 'Public'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals ', 'visibility': 'Internal'}, {'date': '2026-01-06', 'comment': 'We have completed your request. Thank you for your submission.', 'visibility': 'Public'}]" Regular JavaScript has the JSON.parse() method, which allows you to convert a string like that into JSON, but Arcade doesn't have that functionality. Could you create a table from the API call and use that in a one-to-many relationship to get the related records for that feature?
... View more
01-13-2026
08:21 AM
|
0
|
0
|
438
|
|
POST
|
Just a warning that line 7 will crash the code. You'd have to return something like the count of the FeatureSet or get the first feature to get the Locationname attribute like you have in line 8.
... View more
12-18-2025
10:17 AM
|
1
|
0
|
576
|
|
POST
|
In this case, you'd want to use AND instead of OR. I think the confusing part for this query is that it uses NOT in conjunction with the OR. That will result in only filtering out the features that have "Canal" and are of ftype of 460 or 428. A feature of ftype 460 will be returned if it doesn't contain "Canal". To illustrate that, I have a sample dataset where I'm filtering by Region and Field_ID. The original data looks like this If I apply a query like you have to remove records that don't have 1 in the region name or are not 6563, 6564, or 6565, then the only record removed is the one with PRICO1 and 6564. If I use AND in that query, then the three records are removed that meet either criteria
... View more
12-17-2025
11:04 AM
|
2
|
1
|
698
|
|
POST
|
The quotes are incorrect on the SQL Statement within the Filter function. It should like this: "Encroachment_Type_1 = 'Mowing (turf grass)' OR Encroachment_Type_2 = 'Mowing (turf grass)' OR Encroachment_Type_3 = 'Mowing (turf grass)'" Since the Filters appear to be the same except for the layerID, you can use a loop to simplify things. var ids = [0, 1, 2];
var MowingCount = 0;
for (var id of ids) {
MowingCount += Count(
Filter(
FeatureSetByPortalItem(
Portal("https://www.arcgis.com"),
"itemID",
id,
["Encroachment_Type_1", "Encroachment_Type_2", "Encroachment_Type_3"],
false
),
"Encroachment_Type_1 = 'Mowing (turf grass)' OR Encroachment_Type_2 = 'Mowing (turf grass)' OR Encroachment_Type_3 = 'Mowing (turf grass)'"
)
);
}
return MowingCount;
... View more
12-15-2025
05:50 AM
|
0
|
0
|
340
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | a month ago | |
| 1 | 4 weeks ago | |
| 1 | 10-11-2023 06:18 AM | |
| 1 | 03-23-2026 09:23 AM |
| Online Status |
Online
|
| Date Last Visited |
3 hours ago
|