|
POST
|
Note: when posting code, use the Insert/Edit code sample button The polesToday variable doesn't have the correct syntax for the SQL92 expression. That doesn't understand any of the Arcade functions, so you have to put that in via a variable. You can also combine your Filters into a single one, if you'd like. var sql = `inspected_by = 'Codey Vaughn'
AND inspected_date > '${Today()}'`
var polesToday = Filter(poles, sql) The code has to use "> Today", since the function Today returns the value "2024-02-06T00:00:00-05:00". Your dates also have a time component, which puts today's records after this value.
... View more
02-06-2024
10:56 AM
|
1
|
0
|
3130
|
|
POST
|
You can add the URL directly by clicking Add and selection Add layer from URL add.png This brings up the Add layer dialog, which accepts the sub-layer URL add1.png
... View more
02-06-2024
07:45 AM
|
0
|
0
|
2647
|
|
POST
|
The only case where it wouldn't return null with blank fields is if the ClosedDate was blank and the ReopenDate was after today. That would return "Closed". That's why I was asking what you would want to show if one field was blank but the other had a Date. You can test the variants in the Arcade Playground with this code. var ClosedDate = null;
//var ClosedDate = Date(2024,1,1);
var ReopenDate = Date(2024,1,14);
//var ReopenDate = null;
if (ClosedDate <= Today() && Today() <= ReopenDate) return "Closed";
... View more
02-05-2024
01:44 PM
|
0
|
0
|
2665
|
|
POST
|
If you want a working link, you have to use an Arcade element. Here's one example of creating a popup with links from a related table var related = FeatureSetByRelationshipName($feature, "DCGIS.SURDOCS");
var relatedCount = count(related);
var output;
if (relatedCount == 0) {
output = `<p>There are no surveys for this property.<\p>`;
} else if (relatedCount == 1) {
var rec = First(related);
output = `There is 1 survey for this property:
<br>  • <a href="${rec.FILENETLINK}">${rec.DOCGUID}</a>`;
} else {
output = `There are ${relatedCount} surveys for this property:`;
for (var rec in related) {
output += `<br>  • <a href="${rec.FILENETLINK}">${rec.DOCGUID}</a>`;
}
}
return {
type : 'text',
text : output
}
... View more
02-05-2024
06:41 AM
|
2
|
1
|
3036
|
|
POST
|
This is the code to put everything into a single FeatureSet. var p = Portal("https://arcgis.com");
var poles = FeatureSetByPortalItem(p, 'f2180d9e68b3466ab042399a38aea2fd', 0);
var startTime = Min(poles, 'NewTime');
var endTime = Max(poles, 'NewTime');
var TimeElasped = DateDiff(endTime, startTime, 'hours');
var HoursWorked = Round(TimeElasped, 2);
var jsonDictionarySTART = {
fields: [{
alias: "STARTTIME",
name: "STARTTIME",
type: "esriFieldTypeDate",
},
{
alias: "ENDTIME",
name: "ENDTIME",
type: "esriFieldTypeDate",
},
{
alias: "TOTAL_TIME",
name: "TOTAL_TIME",
type: "esriFieldTypeDouble",
},
],
spatialReference: { wkid: 4326 },
geometryType: "esriGeometryPoint",
features: [{
geometry: {
spatialReference: { wkid: 4326 },
x: -151.0063,
y: 63.069,
},
attributes: {
STARTTIME: startTime,
ENDTIME: endTime,
TOTAL_TIME: HoursWorked
},
}]
};
return FeatureSet(Text(jsonDictionarySTART)); However, you can't have line breaks in an Indicator. You can put the individual items in the top, middle, and bottom text indicator.png
... View more
02-02-2024
01:01 PM
|
0
|
0
|
3200
|
|
POST
|
I had the opposite thing going on. The Notification icon showed 13 new messages, but there was nothing new in the feed, just messages I had already read. Snag_19f2150.png
... View more
02-02-2024
12:52 PM
|
1
|
0
|
2708
|
|
POST
|
It did clear up several hours after I posted. I have noticed some other glitches in the last day or so with the Notification icon. Yesterday it was showing 13 but nothing new in the feed. Today, more than once it was showing 2 with nothing new in the feed.
... View more
02-02-2024
12:27 PM
|
0
|
1
|
1464
|
|
POST
|
A better question is what would you want to see if one if blank and the other isn't.
... View more
02-02-2024
09:04 AM
|
0
|
0
|
2730
|
|
POST
|
That code should be changed slightly (changing "==" to "!=" var yourLink = IIF(
$feature.ADS_Link_to_Recording_Report != '',
`<a href="${$feature.ADS_Link_to_Recording_Report}>Link to the report</a>"`,
'No link'
)
... View more
02-02-2024
08:50 AM
|
1
|
0
|
3282
|
|
POST
|
Would both of them be blank or would you have cases where only one is blank?
... View more
02-02-2024
08:46 AM
|
0
|
1
|
2739
|
|
POST
|
You can use this syntax if ($feature.ClosedDate <= Today() && Today() <= $feature.ReopenDate) return "Closed";
... View more
02-02-2024
08:08 AM
|
0
|
0
|
2785
|
|
POST
|
The response counter for a post is showing zero for posts that have several replies. For example this post is showing zero replies in the main list and at the top of the post itself. The post currently has 7 replies 2024-02-02_9-45-10.png response2.png response3.png
... View more
02-02-2024
06:53 AM
|
0
|
3
|
1538
|
|
POST
|
Start by exploring the network traffic to see how much time it's taking to get all of the items. At a quick first glance, it's taking 35 seconds to download the config.json file. That's a very big file, containing many layouts and widgets. time1.png Look at the images that are getting added. It's taking three seconds to download one image. Do you really need an image to be that size? Instead, use a thumbnail with a link to the full-sized image. time2.png
... View more
02-01-2024
08:36 AM
|
1
|
1
|
4248
|
|
POST
|
I would suggest opening a new question on this and provide the code that you've tried.
... View more
02-01-2024
06:20 AM
|
0
|
1
|
17965
|
|
POST
|
Why are you applying the Wait method? Your code is almost the same as in the documentation, but it wraps everything in the QueuedTask and doesn't include the Wait method. public Task SetFeatureLayerSymbolAsync(FeatureLayer ftrLayer, CIMSymbol symbolToApply)
{
if (ftrLayer == null || symbolToApply == null)
throw new System.ArgumentNullException();
return QueuedTask.Run(() =>
{
//Get simple renderer from the feature layer
CIMSimpleRenderer currentRenderer = ftrLayer.GetRenderer() as CIMSimpleRenderer;
if (currentRenderer == null)
return;
//Set symbol's real world setting to be the same as that of the feature layer
symbolToApply.SetRealWorldUnits(ftrLayer.UsesRealWorldSymbolSizes);
//Update the symbol of the current simple renderer
currentRenderer.Symbol = symbolToApply.MakeSymbolReference();
//Update the feature layer renderer
ftrLayer.SetRenderer(currentRenderer);
});
}
... View more
01-31-2024
06:21 AM
|
0
|
2
|
1848
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | a week ago | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|