|
POST
|
Great! Don't forget to click the "Accept as Solution" button on the reply or replies that helped
... View more
02-04-2026
09:34 AM
|
0
|
0
|
345
|
|
POST
|
What else is in your multi-line string? Do the other elements have the special characters?
... View more
02-04-2026
06:00 AM
|
1
|
0
|
828
|
|
POST
|
I'm creating a help document for the widget that I'm building. I've gotten everything written out in a Word doc that approximates the layout of the standard widget configuration page. However, exporting a Word doc makes for a very messy html file. Is there a template available to match the widget configuration page? If not, what have you done for your custom widget's help?
... View more
02-03-2026
01:18 PM
|
0
|
3
|
595
|
|
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
|
857
|
|
POST
|
You should be filtering the entire dataset, not the feature in line 1
... View more
02-03-2026
07:27 AM
|
2
|
0
|
394
|
|
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
|
684
|
|
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
|
403
|
|
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
|
267
|
|
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
|
420
|
|
POST
|
It also works when I join it with a table with domains
... View more
01-28-2026
08:15 AM
|
0
|
1
|
397
|
|
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
|
732
|
|
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
|
531
|
|
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
|
787
|
|
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
|
586
|
| 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 |
a week ago
|