|
POST
|
Hi @JoeBorgione , Quick question... would you create multiple rules since the OP needs to update values from multiple layers or would you use a single attribute rule? If it is the latter, I suppose the return value should be changed to include multiple values. I was looking for an example of this and can't find any, but I suppose it should be similar to updating another feature layer, right?
... View more
03-04-2021
12:21 PM
|
0
|
2
|
9327
|
|
BLOG
|
Hi @utenalarosa , Is it possible to have access to the map and underlying data? I am pretty convinced that this is data-related, but without access, there is little that I can do. If you are able to share, please create a group, share the map and data to the group and invite me to it using my AGOL identity "xbakker.spx".
... View more
03-04-2021
11:49 AM
|
0
|
0
|
12678
|
|
BLOG
|
Hi @utenalarosa , Your formula should work. Can you check and see if the field really has a Null value or an empty string? If it contains as little as a single space the IsEmpty will return false. The same also applies to the link I shared earlier. If there is a space in the field it will not be empty and the row will be shown.
... View more
03-04-2021
11:14 AM
|
0
|
0
|
12714
|
|
POST
|
Hi @TINATHOMPSON , @AlexRodriguez has a valid point. If you have a Python script that worked in ArcMap chances are high that it will work in Pro too (maybe with some slight modifications). A potential downside could be that you need to create some sort of trigger to execute the script to update the data when changes are made. You can work with scheduled tasks in Pro. Now, using attribute rules may have the advantage that updating the data will trigger the attribute rule and update the data so you will always look at updated information and are not depending on a manual or scheduled update. It will require you to rewrite the code, your data must reside in the same data store and they must have GlobalIDs...
... View more
03-04-2021
09:27 AM
|
1
|
0
|
9381
|
|
POST
|
Hi @aroininen , In your example, you are returning a featureset that will display the test as you can see, but it will not show in the pop-up. You need to loop through the resulting features and form a text that can be displayed in the pop-up. Please have a look at this post where you will find and example of how to do this: https://community.esri.com/t5/comunidad-esri-colombia-ecuador/incluir-reportes-estad%C3%ADsticas-en-las-ventanas-emergentes-con/ta-p/915653 (the post is in Spanish but it contains some code blocks that show the way to process the information) or have a look at this blog post by Paul Barker: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/whats-new-in-arcade/
... View more
03-04-2021
09:15 AM
|
1
|
2
|
1466
|
|
BLOG
|
Hi @utenalarosa , I have another post here: https://community.esri.com/t5/arcgis-online-documents/conditional-field-display-with-arcade-in-pop-ups-revisited/ta-p/920869 where I explain how you can hide the entire row in a table when there is no information for that attribute. What you are trying to do is create an empty line (two empty table cells) and I don't think that will look very good.
... View more
03-04-2021
09:08 AM
|
0
|
0
|
12710
|
|
IDEA
|
HI @NicholeSalinger , As I mentioned before within an attribute rule at this moment there is no support for firing REST requests. However, if you are creating your own app using the ArcGIS API for JavaScript you have full control and should be able to code this functionality.
... View more
03-03-2021
09:36 AM
|
0
|
0
|
9575
|
|
POST
|
Hi @PaulDohertyFEMA , thanks for sharing. Hopefully, it will be fixed soon!
... View more
03-02-2021
11:10 AM
|
0
|
0
|
2898
|
|
POST
|
Hi @GISUSER6 , You can do something like this: var streetLayer = FeatureSetByName($datastore, "streets", ["NAME"]);
var searchDistance = 100;
var streetIntersect = Intersect(streetLayer, BufferGeodetic($feature, searchDistance, "feet"));
var cnt = Count(streetIntersect);
var minDistance = Infinity;
var name = Null
if (cnt > 0) {
for (street in streetIntersect) {
var dist = DistanceGeodetic(street, $feature, "feet");
if (dist < minDistance) {
name = street.NAME;
minDistance = dist
}
}
} else {
// pass no features found within search distance, name remains null
}
return name;
... View more
03-01-2021
05:29 AM
|
1
|
0
|
5318
|
|
POST
|
Hi @PlaninforAdmin , It would be best to change the structure of your data since it does not align with what you want to obtain. You can however keep a numeric field and create a domain for it to have an understandable description of the composed value. If you want to symbolize the two fields you don't have to create a new field, you can use Arcade and concatenate the values. If however, you want to create a unique numeric value, it might be an idea to get a structured result. Have a look at the expression below: var active = DomainName($feature, "ACTIVE");
var plan = DomainName($feature, "PLAN_TYPE");
var dct_active = {"YES": 1, "NO": 2};
var dct_plan = {"type1": 1, "type2": 2, "type3": 3};
var result = 0;
if (HasKey(dct_active, active)) {
result = dct_active[active] * 10;
} else {
result = -1 * 10;
}
if (HasKey(dct_plan, plan)) {
result += dct_plan[plan];
} else {
result += -1;
}
return result; A value of 13 would represent: ACTIVE Yes and PLAN_TYPE type3...
... View more
02-26-2021
06:39 AM
|
2
|
0
|
1741
|
|
POST
|
Hi @JustinRains , Let me share some code from a couple of years ago when I created a tool to create polygons from a text file. Although the structure of the textfile I worked on is different from yours it should get you started. #-------------------------------------------------------------------------------
# Name: TXTpoints2Polygons.py
# Purpose: covert TXT file with points to polygons
#
# Author: xbakker
#
# Created: 10/04/2015
#-------------------------------------------------------------------------------
import arcpy
import os
def main():
import sys
import traceback
try:
arcpy.env.overwriteOutput = True
# first parameter is txt file
txt = arcpy.GetParameterAsText(0)
# second parameter (provide default NAME)
fld_name = arcpy.GetParameterAsText(1)
# third parameter is output fc
fc_out = arcpy.GetParameterAsText(2)
# forth parameter is spatial reference
sr = arcpy.GetParameter(3)
# create empty output fc
ws_name, fc_name = os.path.split(fc_out)
geomtype = "POLYGON"
arcpy.CreateFeatureclass_management(ws_name, fc_name, geomtype, spatial_reference=sr)
# add field
arcpy.AddField_management(fc_out, fld_name, "TEXT", field_length=255)
# start insert cursor
flds = ("SHAPE@", fld_name)
with arcpy.da.InsertCursor(fc_out, flds) as curs:
# read input file
cnt = 0
name = ""
first_point = None
lst_pnt = []
with open(txt, 'r') as f:
for line in f.readlines():
cnt += 1
if cnt > 1:
line = line.replace('\n','')
lst_line = line.split('\t')
a = lst_line[0]
if a.isdigit():
# point
if bln_start:
first_point = GetPoint(line)
pnt = GetPoint(line)
lst_pnt.append(pnt)
else:
pnt = GetPoint(line)
lst_pnt.append(pnt)
bln_start = False
else:
# name or header
if a[:5].upper() == 'PUNTO':
pass
else:
if first_point != None:
lst_pnt.append(first_point)
if len(lst_pnt) > 2:
# create previous polygon and write to fc
polygon = arcpy.Polygon(arcpy.Array(lst_pnt), sr)
curs.insertRow((polygon, name, ))
lst_pnt = []
name = line.strip()
bln_start = True
arcpy.AddMessage("Processing polygon: '{0}'".format(name))
if first_point != None:
lst_pnt.append(first_point)
polygon = arcpy.Polygon(arcpy.Array(lst_pnt), sr)
curs.insertRow((polygon, name, ))
except:
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
pymsg = "Errores de Python:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
msgs = "Errores de ArcPy:\n" + arcpy.GetMessages(2) + "\n"
arcpy.AddError(pymsg)
arcpy.AddError(msgs)
def GetPoint(line):
line = line.replace(',','.')
lst_line = line.split('\t')
x = float(lst_line[1])
y = float(lst_line[2])
return arcpy.Point(x, y)
if __name__ == '__main__':
main()
... View more
02-25-2021
01:36 PM
|
1
|
3
|
2307
|
|
POST
|
Hi @JoseSanchez , If you use a standalone script you will need to check out the required Spatial Analyst license for the tool to run. See: https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/checkoutextension.htm
... View more
02-25-2021
01:01 PM
|
5
|
0
|
958
|
|
POST
|
Hola @JOSE_LUISGUTIERREZ_RAMOS , En la página https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformmedia.htm se incluye la explicación de como se permite adjuntar archivos pdf.
... View more
02-25-2021
07:50 AM
|
0
|
0
|
1458
|
|
POST
|
Hola @GeoMapps , Como alternativa es posible publicar datos de SharePoint en ArcGIS Online y luego se puede consumir estos datos en ArcGIS Pro. Ver detalles acá: https://doc.arcgis.com/en/maps-for-sharepoint/foundation-server/use-maps/share-a-layer-on-arcgis.htm
... View more
02-25-2021
07:42 AM
|
1
|
0
|
1603
|
|
POST
|
Hi @VishApte , If the Utility Network is something the client is considering, all three domains could participate in the same Utility Network. There can be additional benefits when combining the Water and Electric domains in the same UN. When for instance a failure in the electric domain affects a water pump station and results in an outage of water. As far as I can see the sequence should reside in the same geodatebase for the attribute rule to have access to it.
... View more
02-25-2021
07:17 AM
|
0
|
0
|
2598
|
| 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
|