|
POST
|
I think they are supported or there is something else that is happening in the background that is occurring. I have a hosted feature service, and the service is currently working where the attribute value changes according to the rule that I set up.
... View more
10-08-2021
07:28 AM
|
0
|
0
|
2201
|
|
POST
|
Thanks @JohannesLindner, This is what I was looking for: var input_domain_code = $feature.InputField
// if the codes of your domains are the same
return input_domain_code
... View more
10-06-2021
12:13 PM
|
0
|
0
|
6738
|
|
POST
|
Hi, I created and attribute rule where the duration field auto-populates with the following values. It runs perfectly fine locally in ArcGIS Pro, but when I publish the hosted layer with this rule it doesn't seem to work. I would greatly appreciate if any could either help or explain the reasoning for this not working. var From = Date($feature.OutageStart)
var To = Date($feature.OutageEnd)
var EndTime = Text(To, 'h:mm A')
var LenOfTime_Days = DateDiff(To, From, 'days')
var days = Round(LenOfTime_Days)
var LenOfTime_Hours = DateDiff(To, From, 'hours')
var LenOfTime_Minutes = 60 - Minute(To)
var duration = 'Approximately ' + days + ' day(s) from 9:00 AM - 4:00 PM ending at ' + EndTime + ' on the last day.'
if (LenOfTime_Days >= 1){
return duration
}
else if(LenOfTime_Days < 1 && LenOfTime_Hours != 0 && LenOfTime_Minutes == 60){
duration = LenOfTime_Hours + ' hour(s)'
}
else if(LenOfTime_Days < 1 && LenOfTime_Hours == 0 && LenOfTime_Minutes != 60){
duration = LenOfTime_Minutes + ' minutes'
}
else if(LenOfTime_Days < 1 && LenOfTime_Hours != 0 && LenOfTime_Minutes != 60){
duration = LenOfTime_Hours + ' hour and ' + LenOfTime_Minutes + ' minutes'
}
return duration - Hosted Feature Service in Web Map - ArcGIS Pro
... View more
10-01-2021
07:10 AM
|
0
|
4
|
2271
|
|
POST
|
Hi @JohannesLindner, Here is what I am trying to accomplish. When the end user selects a code from one domain, loop through another domain and select the matching code, and return the value. I don't know if I explained this enough but if needed, I can provide screenshots if that may help.
... View more
10-01-2021
04:04 AM
|
0
|
3
|
6771
|
|
POST
|
Hi, So I am trying to update one value in one field based on a selected value in another field using domains and attribute rules. So far I am struggling to figure out how to set up the attribute rule where the user selects one value from one domain which in turn automatically updates a value in another field based on matching coded values. Here is what I have so far: var fc = $feature
var POC_fieldname = 'PointOfContact'
var Contact_fieldname = 'ContactInformation'
var PLdom_values = Domain(fc, POC_fieldname)
var PCdom_values = Domain(fc, Contact_fieldname)
var PL_codedVals = PLdom_values.codedValues
var PC_codedVals = PCdom_values.codedValues
for (var PL in PL_codedVals){
for (var PC in PC_codedVals){
if (PL == PC){
return PC
}
}
} I haven't done anything like this in arcade, but I do it all the time in python. I am struggling a bit with this so any help on this would be greatly appreciated. Thanks.
... View more
09-30-2021
10:08 AM
|
0
|
5
|
6885
|
|
POST
|
Thanks @JohannesLindner, I was really hoping that deletions on the fly were possible. I know it is very easy to do using python, since I have built several tools to delete an existing feature if it already exists. I am surprised, however, that automated deletion isn't possible even though attribute changes can be made on the fly. So I assumed that there was a way to set up a rule to automatically delete a record if the criteria were met.
... View more
09-30-2021
06:26 AM
|
0
|
1
|
4316
|
|
POST
|
Hi, I am trying to delete a feature based on the length of time that passes. I am hoping to fully automate a project that we are working on so that if a certain number of days pass, then that particular feature gets deleted. I hope someone can assist. I am relatively new to attribute rules but the few that I have implemented, it has helped significantly with automating tasks. var From = Date($feature.OutageEnd)
var To = Date(Now())
var DaysAfterOutage = DateDiff(To, From, 'days')
//Constants for defining which features to delete//
var UniqueID = $feature.GlobalID
//Define which features to delete after a given amount of time//
if (DaysAfterOutage >= 7){
return {
'edit':[
'deletes':[
{UniqueID}
]
]
}
} Any help on this would be greatly appreciated.
... View more
09-30-2021
04:48 AM
|
0
|
3
|
4346
|
|
POST
|
So web app builder doesn't allow for users to edit from a popup. Instead it is referred to either using the batch attribute widget or the simple editor widget. I believe, based on the video, that the app used was either an older application that Esri designed or it is something that was custom made. So you could try going the custom route if you wish to have something similar, otherwise I do not think that there is anything currently that will allow for that.
... View more
09-21-2021
01:27 PM
|
0
|
0
|
4364
|
|
POST
|
Thanks @IhabHassan for the suggestion. I will give that a try and test it to see how it performs. As for the other constant issue, I think it may have something to do with having the inputs as a table of values rather than simple input values. Is that the case or is there a way to publish the tool with a table of values as inputs rather than constants? I would greatly appreciate it if you or someone could let me know. Thanks.
... View more
09-21-2021
05:13 AM
|
0
|
1
|
1673
|
|
POST
|
Hi, I am trying to publish a script tool as a geoprocessing service, but there are several issues that I have run into recently has caused the tool to not execute as I originally expected. Some of the inputs are converted into constants despite setting the parameters to only execute when there is user input the ability to select a feature class which is derived from in input CAD file doesn't seem to work. I don't know if it possible to publish a tool where the end user can upload a CAD file and then select which feature class to extract the data from. Any help on this would be highly appreciated. Also, I noticed that when the tool is published that the end user can select an analysis layer, but it appears as though they can only select the layer from the organization, not something that is derived. Is this something that would have to be scripted as an update tool validation in order for the end user to select the feature class?
... View more
09-20-2021
01:06 PM
|
0
|
3
|
1713
|
|
POST
|
Hi, I am currently working on a project for creating a custom geoprocessing tool for the web. So far things are working great, the only thing is that I am trying to figure out is if there is a way where I can enable the end user to select the feature classes that reside within the CAD file. I haven't had any luck with this and so I was wondering if maybe it could be the way I am going about it but I wanted to check and see if anyone might be able to either give me some pointers or point me in the right direction. I know CAD files are tricky, especially if they are standalone, but if there is anyone who has written scripts to extract information from these kind of file please let me know. class ToolValidator:
# Class to add custom behavior and properties to the tool and tool parameters.
def __init__(self):
# set self.params for use in other function
self.params = arcpy.GetParameterInfo()
def initializeParameters(self):
# Customize parameter properties.
# This gets called when the tool is opened.
return
def updateParameters(self):
# Modify parameter values and properties.
# This gets called each time a parameter is modified, before
# standard validation.
CADfile = self.params[2].value
featureclasses = [fc for fc in arcpy.ListFeatureClasses(CADfile)]
featureclass = self.params[3].filter
fcs = featureclass.list[featureclasses]
SubdivisionLayers = self.params[4].filter
ParcelsLayers = self.params[5].filter
RoadLayers = self.params[6].filter
if featureclass:
attributevalues = [row[0] for row in arcpy.da.SearchCursor(featureclass, ["Layer"])]
UniqueAttributes = set(attributevalues)
SubdivisionLayers.list = [str(value) for value in UniqueAttributes]
ParcelsLayers.list = [str(value) for value in UniqueAttributes]
RoadLayers.list = [str(value) for value in UniqueAttributes]
return
def updateMessages(self):
# Customize messages for the parameters.
# This gets called after standard validation.
return
# def isLicensed(self):
# # set tool isLicensed.
# return True
... View more
09-17-2021
04:46 AM
|
0
|
0
|
973
|
|
POST
|
I thought I discovered some documentation that showed how to. I will post it here if I ever stumble across it again.
... View more
09-13-2021
12:07 PM
|
0
|
0
|
1931
|
|
POST
|
Hi, I was wondering if what I would like to customize for a custom script tool is even possible. The user input requires the user input for both the northing and easting coordinates. I was wondering if there is a way to set it up so that the inputs are side by side. I don't know if this is possible or not but I just wanted to double check.
... View more
09-13-2021
09:16 AM
|
0
|
3
|
1975
|
|
POST
|
Hi, I am currently working on a tool that converts CAD files submitted by users and then extracts the data and processes it in such a way that we can use that data internally. I need to enable the end user to select or upload the cad dataset and select the type of feature classes that are involved. So my question is, is there a way to set up the tool validation to select all of the feature classes that are in the CAD dataset? class ToolValidator:
# Class to add custom behavior and properties to the tool and tool parameters.
def __init__(self):
# set self.params for use in other function
self.params = arcpy.GetParameterInfo()
def initializeParameters(self):
# Customize parameter properties.
# This gets called when the tool is opened.
return
def updateParameters(self):
# Modify parameter values and properties.
# This gets called each time a parameter is modified, before
# standard validation.
CAD_Dataset = self.params[2].value
featureclasses = self.params[3].filter
fieldname = self.params[4].valueAsText
SubdivisionLayers = self.params[5].filter
ParcelsLayers = self.params[6].filter
RoadLayers = self.params[7].filter
if CAD_Dataset:
featureclasses.list = [fc for fc in arcpy.ListFeatureClasses(CAD_Dataset)]
fieldname = "Layer"
fcfields = [fieldname]
attributevalues = [row[0] for row in arcpy.da.SearchCursor(featureclass, fcfields)]
UniqueAttributes = set(attributevalues)
SubdivisionLayers.list = [str(value) for value in UniqueAttributes]
ParcelsLayers.list = [str(value) for value in UniqueAttributes]
RoadLayers.list = [str(value) for value in UniqueAttributes]
return
def updateMessages(self):
# Customize messages for the parameters.
# This gets called after standard validation.
return
# def isLicensed(self):
# # set tool isLicensed.
# return True Any help on this would be greatly appreciated.
... View more
09-13-2021
07:01 AM
|
0
|
0
|
1012
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-07-2026 01:36 PM | |
| 1 | 02-10-2026 06:09 AM | |
| 1 | 03-04-2026 01:08 PM | |
| 1 | 02-24-2026 12:59 PM | |
| 3 | 03-03-2026 10:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|