|
POST
|
Hi @mshanaghan, So in regards to both hosted and enterprise services, typically you would want to keep everything in either one or the other. Survey123 can be used to update information and write back to a published service from an enterprise sde database but that is bit of a tricky work around and isn't necessarily ideal. If you want to update a hosted service and create the relationships that way then that is probably more ideal when using Survey123. Otherwise it might be best to create the relationship in the feature service published from the enterprise sde database. There are some workarounds to getting information from bar codes in field maps.
... View more
3 weeks ago
|
1
|
4
|
275
|
|
POST
|
Hi @JoseSanchez, Have you looked into using the Table to Domain Tool in ArcGIS Pro. If you modify a domain of one value but wish to update both code and description then you can use this tool. You can also simply use one field for both the code and description values of a domain. Ideally if one sets of codes/descriptions are dependent on another set of values then this tool might be the easiest. However, if there are only small changes, then it might be best to simply modify the codes and descriptions manually.
... View more
3 weeks ago
|
0
|
2
|
337
|
|
IDEA
|
Hi @kyankraehenbuehllaixoversumchK, First, please use the code function when pasting any type of code, otherwise it makes it difficult to troubleshoot your issue. //Field: “Bestand Werte kopieren” (Copy Existing Values)
//Editing Expression:
if (IsEmpty($feature.BAUWERK_REF) || $feature.BESTAND_WERTE_KOPIEREN == 1) {
return false
} else {
var relatedFeatures = FeatureSetByRelationshipName(
$feature,
"ABWASSER_MASTER_OWNER.ABW_BESTAND_BAUWERK",
['BEZEICHNUNG']
);
var firstFeature = First(relatedFeatures);
return (
$feature.BEZEICHNUNG != firstFeature.BEZEICHNUNG
);
}
//Calculated Expression:
return 2
//Field: “Bezeichnung” (Label/Name)
//Calculated Expression:
if (IsEmpty($feature.BAUWERK_REF)) {
return $feature.BEZEICHNUNG
} else {
var relatedFeatures = FeatureSetByRelationshipName(
$feature,
"ABWASSER_MASTER_OWNER.ABW_BESTAND_BAUWERK",
['BEZEICHNUNG']
)
var firstFeature = First(relatedFeatures)
return firstFeature.BEZEICHNUNG
}
//Editing Expression:
//DomainName($feature, "BESTAND_WERTE_KOPIEREN") == "Werte aus Bestand kopieren" Secondly, are these calculations used in the same field calculation or are these two different fields with similar calculations. Depending on which then here is perhaps a better approach. Assuming these are the same field.
... View more
3 weeks ago
|
0
|
0
|
161
|
|
POST
|
You could go a more programmatic route. var fs = FeatureSetByPortalItem('d651aa4112e5408ea9a1cfabecd6485c', 23)
// Create schema for the returned FeatureSet
var HRC = "HOUR_OF_CRASH" ; var TODn = "TOD"
var FDict = Dictionary( HRC, "esriFieldTypeInteger", TODn, "esriFieldTypeString" )
var fields = [
{ name: HRC, type: FDict[HRC] },
{ name: TODn, type: FDict[TODn] }
];
var features = [];
for (var f in fs) {
FDict[HRC] = f.[HRC]
FDict[TODn] = When( hour >= 0 && hour <= 5, "Night", hour <= 8, "Morning", hour <= 15, "Day", hour <= 23, "Evening", Null )
Push( features, { attributes: FDict })
}
return FeatureSet( fields:fields, features:features, geometry:'' )
... View more
3 weeks ago
|
0
|
0
|
223
|
|
POST
|
The other thing to add, depending on if you are using an enterprise sde database, is the NextSequenceValue. This is first generated by running the generate sequence tool that, once created, will autoincrement a new numerical number. If you are looking make that id alphanumeric, then you can concatenate the next sequential number with any string characters you want.
... View more
3 weeks ago
|
0
|
0
|
150
|
|
POST
|
Hi @Bec, So the issue is that you are not returning a feature. When creating a custom data expression you should return a value similar to the one below. var portal = Portal("https://www.arcgis.com");
var fs = FeatureSetByPortalItem('d651aa4112e5408ea9a1cfabecd6485c', 23)
// Create schema for the returned FeatureSet
var fields = [
{ name: "HOUR_OF_CRASH", type: "esriFieldTypeInteger" },
{ name: "TOD", type: "esriFieldTypeString" }
];
var features = [];
for (var f in fs) {
var hour = f.HOUR_OF_CRASH;
var tod = When( hour >= 0 && hour <= 5, "Night", hour >= 6 && hour <= 8, "Morning", hour >= 9 && hour <= 15, "Day", 16 && hour <= 23, "Evening", Null )
Push( features, { attributes: { HOUR_OF_CRASH: hour, TOD: tod } })
}
return FeatureSet( fields, Values, geometry:'' )
... View more
3 weeks ago
|
1
|
3
|
241
|
|
POST
|
That was going to be my other recommendation as well. Having a dictionary of fields to map makes data migration easier but it is a bit time consuming if you only know one dataset and how to map to it. If I have multiple datasets I typically use a dictionary such as the one below. fieldmappings = {
('A_FieldA','B_FieldA','C_FieldA') : 'MyFieldA',
('A_FieldB','B_FieldB') : 'MyFieldB'
}
... View more
11-04-2025
06:49 AM
|
1
|
0
|
387
|
|
POST
|
Hi @ARyanWADNR, So the append tool can sometimes be problematic when running outside of a pro session and can lead to issues. One recommendation that I have is instead to use cursors to update the feature rather than calling a tool. Cursors give you more control over certain conditions and are better at limiting certain types of information. import arcpy
from arcpy.da import search as SearchCursor, update as UpdateCursor, insert as InsertCursor, Edit as Editor
from arcpy import ListFields
gis = GIS('home')
fs = gis.content.get('')
layer = fs.layers[0]
fields = [field.name for field in ListFields(layer ) ]
# fields = [field.name for field in ListFields(layer ) if <some matching field conditions> such a list of names or datatype, etc... ]
data = {}
with search( layer , fields ) as cursor:
for row in cursor:
data[row[0]] = row
with Edit(<your editing layer workspace>) as editing:
with insert(<editing layer>, fields ) as cursor:
for key, values in data.items():
cursor.insertRow(values) This is just an example but should at least perhaps help guide you in case you want to try a different approach. With cursors, as mentioned above, these give you more control on how to set certain updates depending on your criteria and are far more flexible than the imported tools. @HaydenWelch, @DanPatterson , @DougBrowning may provide better recommendations or even other methods that yield the same result.
... View more
11-03-2025
11:55 AM
|
2
|
6
|
459
|
|
POST
|
The only other thing I can think of that would merge the two would be to create rule where if the conditions were met it would do the update and delete for you. For instance: Add a numerical field and set the value to Object ID of the feature you wish to merge Create a rule where if the field is populated with the OID of the desired feature then set it to do the following Filter the featureset so that the OID of the merging feature is equal to the OID value of the updated feature Use the Union function to merge the feature geometries of both features into a single geometry. Check if the fields for upper/lower address bounds are different than the fields in the updated record of the merging OID. Update the other record using the min/max functions for the filtered featureset. Return the results such it returns the updated records OID with those values. Create another rule with the DELETE capability and set it so that it filters using the same filter as the previous rule but will only delete when either the upper/lower address bounds are equal. @HusseinNasser2 may be able to speak to this but I would like to get his take on it.
... View more
11-03-2025
08:33 AM
|
0
|
0
|
298
|
|
POST
|
That makes it a bit more clear now. So what you can do is set the condition to identify the original feature in conjunction with the edit context. With the $originalfeature you can identify the feature before it's deleted and $editcontext.editType to be 'DELETE' so that upon deletion it pulls the original feature and then updates the new feature with the old value
... View more
10-30-2025
02:58 PM
|
1
|
0
|
366
|
|
POST
|
Hi @BriannaF, So there are a couple of ways around it so here are some options. Set the rule to filter the featureset to filter based on a common value. I assume the street name in this instance. var RH = $feature.R_from
var RL = $feature.R_to
var LH = $feature.L_from
var LL = $feature.L_to
// Filter featureset for matching streetnames
var ObjID = $feature.OBJECTID
var StreetName = $feature.<stname>
var FS = Filter( $featureset, '<insert stname field> = @StreetName AND OBJECTID <> @ObjID ' )
if( Count( FS ) > 0 ){
FS = Intersects( $feature, FS )
if( Includes( ['FeatureSet','Feature'], TypeOf(FS) ){
RL = Min(FS,R_to)
LL = Min(FS,L_to)
}
}
// Compute final union ranges (deleted is SECOND, merged is FIRST)
var final_L_from = toNum(mergedFromL);
var final_L_to = toNum(deletedToL);
var final_R_from = toNum(mergedFromR);
var final_R_to = toNum(deletedToR);
// These console messages print out the correct final ranges
Console("Final L From: " + Text(final_L_from));
Console("Final L To: " + Text(final_L_to));
Console("Final R From: " + Text(final_R_from));
Console("Final R To: " + Text(final_R_to));
// This console message prints out the correct ID to be updated
Console("Merged Road ID to Update: " + Text(mergedRoad.GlobalID));
// Apply updates to the kept (merged) feature
return {
'edit': [{
'className': 'ROADS_StatePlane',
'updates': [{
'OBJECTID': mergedRoad.OBJECTID,
'attributes': {
'LFROM_Test': final_L_from,
'LTO_Test': LL,
'RFROM_Test': final_R_from,
'RTO_Test': RL
}
}]
}]
}; This is just a suggestion and I can give you another but without seeing the full code this should hopefully point you in the right direction. Another would be to convert the overlapping vertices to points and finding the lowest values based on the points.
... View more
10-30-2025
02:00 PM
|
0
|
2
|
377
|
|
POST
|
Hi @dsinha. It is recommended should the desired result not be what you want. It could help you troubleshoot where there are issues in your code.
... View more
10-23-2025
11:03 AM
|
0
|
0
|
343
|
|
POST
|
Hi @dsinha, Have you used the Console() function to see if there is any result for the feature? You can also verify that there are records by using the Count() function in conjunction with the Console() to see if there are any records that are returned by your query. It could be that either the query is resulting in no records returning or that there is something else going on. Did you double check that the field name(s) exist and you are filtering for the correct data? Ex. ("ParcelPin = '1000000'") vs (ParcelPin = 1000000"). If you use the console then it should help troubleshoot the issue.
... View more
10-23-2025
10:14 AM
|
0
|
2
|
355
|
|
POST
|
Hi @MelissaSullivan, Try this. var sportslist = Dictionary(
'ballfield', 'Ballfield',
'basketball', 'Basketball',
'cricket', 'Cricket',
'discgolf', 'Disc Golf',
'football', 'Football',
'golf', 'Golf',
'pickleball', 'Pickleball',
'raquetball', 'Ballfield',
'pickleball', 'Racquetball',
'sandvolleyball', 'Sand Volleyball',
'soccer', 'Soccer',
'swimming', 'Swimming',
'tennis', 'Tennis'
)
Expects($feature,'*')
var String = []
for( var f in $feature){ if( HasKey(sportslist),f) && $feature[f] == 'YES' ){ Push(String,'• '+sportslist[f]) } }
iif( Count( String ) > 0 , Concatenate(String,'\n'), 'No Activities' )
... View more
10-23-2025
07:11 AM
|
2
|
0
|
346
|
|
POST
|
I believe @AustinAverill was just an example. You might need to change your Portal and portal item to whatever your data specifies using the structure provided.
... View more
10-21-2025
11:15 AM
|
0
|
5
|
261
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Tuesday | |
| 1 | Wednesday | |
| 1 | 2 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 3 weeks ago |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|