|
POST
|
Hi @DonovanC , In addition to what Joshua mentioned, it seems you have different date notations MM/DD/YYYY and DD-MM-YYYY and there is more than a single date in the text field. To provide an example to extract the first data based on what I have seen from the screenshot, here is an example with Arcade (in Python this could be done in a lot less lines): Function Convert2DateTime(txt) {
var dttxt = Mid(txt, 1, 22);
var y = Number(Mid(dttxt, 6, 4));
var mi = Number(Mid(dttxt, 14, 2));
var s = Number(Mid(dttxt, 17, 2));
if (Find("-", dttxt) == -1) {
// MM/DD/YYYY HH:mm:SS AP
// 0123456789012345678901
// 05/09/2020 10:46:41 AM
var mo = Number(Mid(dttxt, 0, 2)) -1;
var d = Number(Mid(dttxt, 3, 2));
var ampm = Right(dttxt, 2);
if (ampm == "AM") {
var h = Number(Mid(dttxt, 11, 2));
} else {
var h = Number(Mid(dttxt, 11, 2)) + 12;
}
} else {
// DD-MM-YYYY HH:mm:SS
// 0123456789012345678
// 09-05-2020 10:46:41
var mo = Number(Mid(dttxt, 3, 2)) -1;
var d = Number(Mid(dttxt, 0, 2));
var h = Number(Mid(dttxt, 11, 2));
}
// Date(year, month, day, hours, minutes, seconds)
return Date(y, mo, d, h, mi, s);
}
var dts = ['<09-05-2020 10:46:41> 0-1 <09-05-2020 10:46:46>',
'<09/05/2020 10:55:17 AM> 1'];
for (var i in dts) {
var txt = dts[i];
Console("txt: " + txt);
var dt = Convert2DateTime(txt);
Console("dt: " + dt);
}
return "OK"; In this example, two different formats as send to the function to validate the result. It will print the following to the console: txt: <09-05-2020 10:46:41> 0-1 <09-05-2020 10:46:46>
dt: 2020-05-09T10:46:41-05:00
txt: <09/05/2020 10:55:17 AM> 1
dt: 2020-09-05T10:55:17-05:00
... View more
01-13-2021
11:06 AM
|
2
|
9
|
11234
|
|
POST
|
Hi @utenalarosa , Unfortunately in ArcGIS Online the result is returned as text and as you noticed the text does not support the hyperlinks. This is something that you can do in ArcGIS Pro, since in Pro you can return HTML. It is on the Roadmap to include this in ArcGIS Online too, but I don't know when this will be included.
... View more
01-12-2021
11:16 AM
|
1
|
2
|
3231
|
|
POST
|
Hi @DataOfficer , Q: Is there any way to calculate the field of an attribute table based on an arcade expression for the intersect of two layers? A: Yes, if the data is stored in the same datastore and you are using $datastore in the Arcade expression ($map is not supported in the Field Calculation profile) Q: Is there any way to define the symbology based on an arcade expression for the intersect of two layers? A: No, the symbology profile does not provide access to other features and featuresets. You can however, calculate a field based on other features and featuresets and define the symbology on that newly created field.
... View more
01-12-2021
11:13 AM
|
1
|
1
|
8087
|
|
POST
|
Hi @utenalarosa , Good to know that the concatenation of the two values results in a correct id. However, the SQL needs to be changed. On line 7 change it to this: // change "Fieldname" by the correct name of the field
var sql = "Fieldname = @id";
// or use (assuming the field is string)
var sql = "Fieldname = '" + id + "'";
... View more
01-12-2021
06:57 AM
|
1
|
4
|
3239
|
|
POST
|
Hola Macelo (@mjingo1 ), Primero que todo, feliz año! Creo que en este caso lo mejor es tomar contacto con soporte con el fin de mirar en que manera podemos ayudarle. Ver: https://esri.co/soporte_my-esri/
... View more
01-09-2021
01:51 PM
|
0
|
0
|
1104
|
|
POST
|
Hi @utenalarosa , I noticed that you wrote to me directly. Please have a look at the SQL query. It should follow the syntaxis of "Fieldname = value"
... View more
01-09-2021
01:45 PM
|
1
|
6
|
3246
|
|
POST
|
Hi @DonSjoboen , The symbology profile of Arcade does not support access to related tables. You will need to have the information available in the actual featureset to symbolize it. This can be done by using a scheduled task and calculate this (but when the interval is large the result will not reflect recent changes in the data), or you can implement attribute rules to update the result when a change in the data occurs. This will require storage of the data in a file or enterprise geodatabase. Be aware that there is no support for this in ArcGIS Online yet.
... View more
01-09-2021
01:43 PM
|
0
|
0
|
1245
|
|
POST
|
Hi @JoeBorgione , happy New Year to you too. I think the desired functionality of an attribute rule would be that it would be triggered by the newly appended features. Might be good to register this with support, since I don't think this is correct behavior.
... View more
01-09-2021
01:10 PM
|
0
|
0
|
2124
|
|
POST
|
Hi @LukeAllen2 , As far as I can tell that is not currently possible using Arcade.
... View more
01-09-2021
01:07 PM
|
1
|
0
|
2573
|
|
POST
|
Hi @AlaskaDepartment , I think the problem is in the intersects function. You need to specify the plumes featureset as first parameter and the current feature as second parameter. Try this: var poi = $feature;
var plumes = FeatureSetByName($map, "Groundwater Plumes");
var intersectLayer = Intersects(plumes, poi);
var cnt = Count(intersectLayer);
var plume_int = "";
if (cnt >= 1) {
plume_int = "Intersecting";
} else {
plume_int = "Not Intersecting";
}
return plume_int;
... View more
01-09-2021
12:52 PM
|
1
|
0
|
1505
|
|
POST
|
Hi @JasonBennett , To count the attachments, would require more line, since you would have to go from the feature to the related table with the attachments and query the attachments before you can do the count. Are you trying to update an attribute on the layer to indicate the number of attachments per feature? Is the data static? If not, you will have to recalculate the values when the features and attachments are updated-
... View more
01-01-2021
02:57 PM
|
2
|
1
|
4042
|
|
POST
|
Hi @LydiaBarnard , As @JoshuaBixby mentioned, the problem is with using the median on a layer. From your question I am deducing that you want to change the symbology. Is that correct? If so, you don't have access to the $layer and the $layer does not have a median. For symbology, you only have access to the current feature and not all the features in the layer. In the pop-up you can access the layer and do statistics on the layer, but there is no Median function. There is a Mean function: https://developers.arcgis.com/arcade/function-reference/math_functions/#mean
... View more
01-01-2021
02:52 PM
|
1
|
0
|
1241
|
|
POST
|
Hi @LukeAllen2 , I don't think it is possible to filter an external service using Arcade. Your options in this case are pretty limited with Arcade. You can show information in a pop-up that only applies to your study area (if the Arcade expression has access to the study area geometry), if that is what you are after. As an alternative to the option provided by @Anonymous User , you could use a Notebook (ArcGIS API for Python, https://developers.arcgis.com/python/ ) and schedule the notebook to update a hosted service with a defined frequency.
... View more
01-01-2021
02:44 PM
|
1
|
2
|
2608
|
|
POST
|
Hi @JoeBorgione , The NextSequenceValue should generate a new value every time a value is inserted in your data. How did you configure the sequence? The functionality that you are looking for is the one you are using, but it is strange that the same value is generated for each new feature (I don't think an append would be a single action and triggering the attribute rule only once...)
... View more
01-01-2021
02:27 PM
|
0
|
2
|
2161
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|