|
POST
|
Hi @JenniferMcCollom1 , I have worked on multiple projects over the last few weeks with different use cases and all using the new Arcade data expressions and I am very excited about what it can do. If I find the time I will write something down providing the code and explanation.
... View more
06-04-2021
06:42 AM
|
1
|
0
|
8370
|
|
POST
|
Hi @PaulSweeney3 , It is possible to use a union to merge geometries into a single geometry, but normally with lines, this will result in a multipart geometry. If that is not a problem, you should probably use this option. You can also access the individual vertices and create a single polyline. This challenge will be to get the lines in the right order and make sure that each individual line is captured in the same direction to avoid obtaining weird lines. Let me know in what direction you want to go.
... View more
05-31-2021
10:45 AM
|
0
|
0
|
2106
|
|
POST
|
Hi @Anonymous User , I hate to be the carrier of bad news, but in ArcGIS Online at this moment you cannot return HTML and you will need HTML to create multiple links from a single Arcade expression (ArcGIS Pro supports this, but AGOL is not there yet). There are ways to accomplish this in AGOL (in theory) but these would need multiple expressions and conditional visualization and would have a serious impact on performance.
... View more
05-28-2021
06:30 AM
|
0
|
1
|
3294
|
|
POST
|
Hi @PhilippeVDV , Sorry for the delay. I believe the new Dashboard was recently released in Enterprise 10.9. And yes I think it would be good to have support look at the way they manage arcade expressions in a table in WAB.
... View more
05-28-2021
06:27 AM
|
0
|
0
|
1890
|
|
POST
|
Hola @Juan_CarlosCarpio , Hay una diferencia entre la precisión con que se captura la información y como se muestra la información. Si solamente al consultar la información, se requiere reducir la cantidad de decimales, es simplemente la configuración del campo y ajustar la configuración en el mapa. O en el map viewer nuevo:
... View more
05-21-2021
04:21 PM
|
1
|
0
|
1514
|
|
POST
|
Hi @izk_1989 , In addition to what Ken correctly pointed out, there is another error: you don't have a total field, you have ClinicCount. I also formatted the result a bit differently. // Reference the points feature layer
var patientsDA = FeatureSetByName($map,"PointsLayer")
// Count the number of patients within each polygon
var cntPatients = Intersects(patientsDA, $feature)
// Group patients by their facility and count
var stats = GroupBy(cntPatients, "facility_name", [
{name: "ClinicCount", expression: "facility_name", statistic: "COUNT"}
])
// Order the results in descending order by the total counts
var topFacilities = Top(OrderBy(Filter(stats, "facility_name <> ''"),"ClinicCount desc"), 3)
// Popup placeholder
var result = 'The Top Facilities in this area are:'
// Write the results to the popup
if(Count(topFacilities) == 0){
return "No Patients in this area"
}
var num = 0
// Format the results for display in popup
for(var item in topFacilities){
num++
var num_clinics = item["ClinicCount"]
var clinic_name = item["facility_name"]
result += TextFormatting.NewLine + num + ". " + clinic_name + ": " + num_clinics + " Patients"
}
return result
... View more
05-21-2021
06:51 AM
|
1
|
3
|
11164
|
|
POST
|
Hi @PhilippeVDV , Perhaps you can get an enhanced experience using the new Arcade data expressions in Dashboard (the new one). This allows you to access any data that you have access to and transform it in a way you need. It does not apply for the map widget, but it does for most other widgets. It might be worth having a look at this capability. Yesterday I did a little test on some local vaccination data from Colombia and did some analysis as to when a certain phase would initiate. People have been divided into 5 groups and I wanted to know when a certain group would be able to get their vaccine. There are a lot of assumptions in the analysis but it does provide an indication and I am stunned by what one can do with this new capability:
... View more
05-21-2021
06:21 AM
|
0
|
2
|
8588
|
|
POST
|
Hi @Anonymous User , Indeed the HTML configuration of the pop-up is not yet implemented in the Map Viewer and the Classic Map Viewer should be used for this. It will show up correctly in the new Map Viewer.
... View more
05-20-2021
12:23 PM
|
0
|
0
|
4485
|
|
POST
|
Hi @Anonymous User , Just did the test and it will work in ArcGIS Online: I configured it in the old Map Viewer but it displays better in the new map viewer. What you need to do is create 1 Arcade expression for each SDG with the following content: var txt = Replace($feature["SDGs"], " ", "");
var lst = Split(txt, ",");
if (IndexOf(lst, "#") > -1) {
return "block";
} else {
return "none";
} Change the "#" on line 3 for the SDG number the images applies to (no leading zero). Configure to use a customized HTML pop-up: Change to HTML mode: Paste the following HTML: SDGs {SDGs}<br />
<br />
<img alt="SDG 01" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-01.png?resize=100%2C100&ssl=1" style="display:{expression/expr0}" />
<img alt="SDG 02" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-02.png?resize=100%2C100&ssl=1" style="display:{expression/expr1}" />
<img alt="SDG 03" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-03.png?resize=100%2C100&ssl=1" style="display:{expression/expr2}" />
<img alt="SDG 04" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-04.png?resize=100%2C100&ssl=1" style="display:{expression/expr3}" />
<img alt="SDG 05" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-05.png?resize=100%2C100&ssl=1" style="display:{expression/expr4}" />
<img alt="SDG 06" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-06.png?resize=100%2C100&ssl=1" style="display:{expression/expr5}" />
<img alt="SDG 07" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-07.png?resize=100%2C100&ssl=1" style="display:{expression/expr6}" />
<img alt="SDG 08" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-08.png?resize=100%2C100&ssl=1" style="display:{expression/expr7}" />
<img alt="SDG 09" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-09.png?resize=100%2C100&ssl=1" style="display:{expression/expr8}" />
<img alt="SDG 10" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-10.png?resize=100%2C100&ssl=1" style="display:{expression/expr9}" />
<img alt="SDG 11" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-11.png?resize=100%2C100&ssl=1" style="display:{expression/expr10}" />
<img alt="SDG 12" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-12.png?resize=100%2C100&ssl=1" style="display:{expression/expr11}" />
<img alt="SDG 13" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-13.png?resize=100%2C100&ssl=1" style="display:{expression/expr12}" />
<img alt="SDG 14" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-14.png?resize=100%2C100&ssl=1" style="display:{expression/expr13}" />
<img alt="SDG 15" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-15.png?resize=100%2C100&ssl=1" style="display:{expression/expr14}" />
<img alt="SDG 16" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-16.png?resize=100%2C100&ssl=1" style="display:{expression/expr15}" />
<img alt="SDG 17" src="https://i1.wp.com/www.un.org/sustainabledevelopment/wp-content/uploads/2019/08/E-Goal-17.png?resize=100%2C100&ssl=1" style="display:{expression/expr16}" />
... View more
05-19-2021
12:17 PM
|
1
|
1
|
4496
|
|
POST
|
Hi @Anonymous User , If this was a ArcGIS Pro question, the answer would be simple. You can use Arcade and generate the HTML and return the images as show below: You were really close, but keep in mind that using a return statement inside a loop will return the first item and exits the loop. ArcGIS Online does not allow the return of HTML from an Arcade expression. You will need an expression for each image and return it inside an HTML formatted pop-up and probably need another expression to hide an image when you don't have that number in the list. I have done some HTML formatting with conditional images described here: https://community.esri.com/t5/arcgis-online-documents/create-pop-ups-in-arcgis-online-with-conditional-images-using/ta-p/916518 but maybe including all the 17 images and hide them depending on the values supplied would be a better way. You can find an example here: https://community.esri.com/t5/arcgis-online-documents/conditional-field-display-with-arcade-in-pop-ups-revisited/ta-p/920869 I will do a quick test first to share some more details later on.
... View more
05-19-2021
09:58 AM
|
0
|
2
|
4501
|
|
POST
|
Hi @PhilippeVDV , There is a big difference between the impact of an Arcade expression when called from a pop-up (it will be executed once) and from the attribute table. In an attribute table, there can be potentially thousands of records and each record would trigger the execution of the Arcade expression. This would have a huge impact on performance. Therefore, you will see a link that will execute a single expression to avoid this. The same you will experience in WAB. Can you explain a little bit about what experience you want to provide to the end-user?
... View more
05-18-2021
01:58 PM
|
0
|
4
|
8610
|
|
POST
|
Hi @AlexP_ , Attribute Rules use Arcade, as you already know, and currently, there is no support for projecting coordinates between coordinate systems in Arcade. The formulas you mentioned earlier only serve to translate Web Mercator Auxilliary Sphere to WGS1984. Only if you have the math to do this translation you will be able to do this using Arcade. That is the situation at this moment. You may want to think about using a programmed task that executes a script and fills the attributes with the DD values. Not sure when projections will be supported in Arcade. I have heard that REST calls will be supported in Arcade later on, and this would also solve this problem.
... View more
05-14-2021
02:13 PM
|
1
|
0
|
7169
|
|
POST
|
Hi @FPGIS_FrancescaRohr , I'm glad it was fixed. If you need some more help further along the line, don't hesitate to tag me.
... View more
05-14-2021
02:00 PM
|
0
|
0
|
2843
|
|
POST
|
Hi @FPGIS_FrancescaRohr , Sorry for the delay, but I was stuck in some meetings. I just had a look at the data and I think I have the answer. As you can see it now returns the number of inspections: There was just a tiny mistake in the expression. when you construct the SQL you use an underscore "_" when the data uses a hyphen "-". Also in my case the name of the layer was a bit different, but this could just be for me.
... View more
05-14-2021
12:12 PM
|
0
|
0
|
2846
|
|
DOC
|
Hola @Carlos_AndresCamacho_Acuña , cómo estás? Revisando el primer bloque me di cuenta de algunos errores pequeños. Al comienzo el signo "=" después de "var tbl ". Y hacia el final sobraba una corcheta. // Inicialmente, se relaciona la dbase table que almacena los registros de operaciones realizadas a la válvula
var tbl = FeatureSetByRelationshipName($datastore,"OperacionValvula");
// Se relaciona el atributo en el feature Class que actúa como llave entre el feature y la tabla relacional
var codigo = $feature["GlobalID"];
// Se establece el query que se creará en la tabla para filtrar los registros de operaciones de la válvula seleccionada
var sql = "ID_GLOBAL = @codigo";
Console(sql);
// Se generan los filtros
var operaciones = Filter(tbl, sql);
// Se realiza el conteo de operaciones
var cnt = Count(operaciones);
var historia = "";
if (cnt > 0) {
historia = cnt + " Operaciones realizadas a la válvula:";
} else {
historia = "No hay operaciones realizadas a la válvula";
}
return historia; En la segunda parte te falta declarar el variable resultado: var fs = FeatureSetByName($map, "Valvulas_IBAL_2021");
var valvulas = Intersects(fs, $feature);
var cnt = Count(valvulas);
var resultado = "";
if (cnt > 0) {
resultado = "Hay " + cnt + " valvulas en la comuna";
} else {
resultado = "No hay valvulas en la comuna";
}
return resultado;
... View more
05-13-2021
04:26 PM
|
0
|
0
|
12754
|
| Title | Kudos | Posted |
|---|---|---|
| 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 | |
| 1 | 05-29-2019 02:45 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-26-2025
02:43 PM
|