|
POST
|
Greetings: This has been an ongoing issue and looks like there are similar issues/complaints from other Workforce Users/Admins. Want to provide new information and see if anyone has any insight Mobile Device for mobile worker has solid internet connection, either thru mobile network or office Wifi Connection. The app/project is set to auto-sync, but does not regularly do that. Forman has to hit the sync now (manual sync). However, it goes for a long period of time (almost 10 minutes) and does not finish. Only solution we have found is to Log-out of the Android Workforce App, re-log in and do a force sync. Most of the time, this works. However, this is very inconvenient for our field crew(s), since they cannot stop of (5) minutes to manually sync the project to get new assignments from the office. Would like to find a way to resolve this if anyone has any feedback (current workforce users/admins, ESRI programmers, etc). Our department supervisors and crew foreman are constantly complaining to me and I have no solutions or work-arounds. Thank You @LizArmstrong @CraigGillgrass @ShawnDerrington
... View more
12-02-2024
02:07 PM
|
0
|
16
|
3534
|
|
DOC
|
@JakeSkinner Good to go again. Appreciate this. Verified the Hosted Feature Layer had the Sync re-enabled after the script was ran. Also, shows the modified date was also updated in AGOL. Exactly what was needed.
... View more
12-02-2024
09:24 AM
|
0
|
0
|
13603
|
|
DOC
|
@JakeSkinner Here is one of the original scripts I have been using, for some reason when the script finishes, the sync enabled is unchecked and I have to recheck it via AGOL each time. # Variables
prjPath = r"C:\Users\cwafstet\Documents\MODERN GIS WORKING FILES\ELECTRIC\ArcGIS PRO PROJECTS\AGOL UPDATE - DATASET - ELECTRIC.aprx" # Path to Pro Project
map = 'MODERN ELECTRIC AGOL UPDATES' # Name of map in Pro Project
serviceDefID = 'a57db3b4e0db4cddafc7dacaf33cd317' # Item ID of Service Definition
featureServiceID = '0694901da5ce44bbba3d0cec88e1bb6c' # Item ID of Feature Service
portal = "https://www.arcgis.com" # AGOL
user = "xyzx" # AGOL username
password = "xyzx" # AGOL password
preserveEditorTracking = True # True/False to preserve editor tracking from feature class
unregisterReplicas = False # True/False to unregister existing replicas
# Set Environment Variables
arcpy.env.overwriteOutput = 1
# Disable warnings
requests.packages.urllib3.disable_warnings()
# Start Timer
startTime = time.time()
print(f"Connecting to AGOL")
gis = GIS(portal, user, password)
arcpy.SignInToPortal(portal, user, password)
# Local paths to create temporary content
sddraft = os.path.join(arcpy.env.scratchFolder, "WebUpdate.sddraft")
sd = os.path.join(arcpy.env.scratchFolder, "WebUpdate.sd")
sdItem = gis.content.get(serviceDefID)
# Create a new SDDraft and stage to SD
print("Creating SD file")
arcpy.env.overwriteOutput = True
prj = arcpy.mp.ArcGISProject(prjPath)
mp = prj.listMaps(map)[0]
serviceDefName = sdItem.title
arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, serviceDefName, 'MY_HOSTED_SERVICES',
'FEATURE_ACCESS', '', True, True)
arcpy.StageService_server(sddraft, sd)
# Reference existing feature service to get properties
fsItem = gis.content.get(featureServiceID)
flyrCollection = FeatureLayerCollection.fromitem(fsItem)
properties = fsItem.get_data()
# Get thumbnail and metadata
thumbnail_file = fsItem.download_thumbnail(arcpy.env.scratchFolder)
metadata_file = fsItem.download_metadata(arcpy.env.scratchFolder)
# Unregister existing replicas
if unregisterReplicas:
if flyrCollection.properties.syncEnabled:
print("Unregister existing replicas")
for replica in flyrCollection.replicas.get_list():
replicaID = replica['replicaID']
flyrCollection.replicas.unregister(replicaID)
# Overwrite feature service
sdItem.update(data=sd)
print("Overwriting existing feature service")
if preserveEditorTracking:
pub_params = {"editorTrackingInfo" : {"preserveEditUsersAndTimestamps":'true'}}
fs = sdItem.publish(overwrite=True, publish_parameters=pub_params)
else:
fs = sdItem.publish(overwrite=True)
# Update service with previous properties
print("Updating service properties")
params = {'f': 'pjson', 'id': featureServiceID, 'text': json.dumps(properties), 'token': gis._con.token}
agolOrg = str(gis).split('@ ')[1].split(' ')[0]
postURL = f'{agolOrg}/sharing/rest/content/users/{fsItem.owner}/items/{featureServiceID}/update'
r = requests.post(postURL, data=params, verify=False)
response = json.loads(r.content)
# Update thumbnail and metadata
print("Updating thumbnail and metadata")
fs.update(thumbnail=thumbnail_file, metadata=metadata_file)
endTime = time.time()
elapsedTime = round((endTime - startTime) / 60, 2)
print(f"Script completed in {elapsedTime} minutes") The script that you updated, will not run saying it cannot run with a sync enabled hosted feature layer. I am getting this message when running the updated script with a Hosted Feature Layer that has sync enabled: fc = r"C:\Users\cwafstet\Documents\MODERN GIS WORKING FILES\ELECTRIC\GEODATABASES\MEWCo ELECTRIC SYSTEM.gdb\AGOL_ELECTRIC_DATASET\UG_PRIMARY_CONDUCTOR_FEEDER" # Path to Feature Class
fsItemId = "dbf687af06b649d3afafbc8469e8d448" # Feature Service Item ID to update
featureService = True # True if updating a Feature Service, False if updating a Hosted Table
hostedTable = False # True is updating a Hosted Table, False if updating a Feature Service
layerIndex = 0 # Layer Index
disableSync = True # True to disable sync, and then re-enable sync after append, False to not disable sync. Set to True if sync is not enabled
updateSchema = False # True will remove/add fields from feature service keeping schema in-sync, False will not remove/add fields
upsert = True # True will not truncate the feature service, requires a field with unique values
uniqueField = 'GlobalID' # Field that contains unique values
# Environment Variables
arcpy.env.overwriteOutput = True
arcpy.env.preserveGlobalIds = True Appreciate any feedback on either of the (2) scripts.
... View more
11-27-2024
12:37 PM
|
0
|
0
|
13672
|
|
DOC
|
@JakeSkinner I am using one of your previous scripts to update a single Hosted Feature Layer. Part of the script disables the sync feature on the FL in AGOL. How do I go about re-enabling the sync at the end of the script? Without the FL having Sync Enabled, it is giving our Workforce Project(s) real problems with the layers. Appreciate your help as always
... View more
11-27-2024
10:35 AM
|
0
|
0
|
13681
|
|
POST
|
@RobertKrisher Thank you for the response. I did verify all of the rule(s) I need - Medium/Low Voltage Pole to Cable/Fiber/Telecom (Joint Use) Relate Rules are infact Enabled. Still seeing the Red warning error in the attribute dialog box, but can "Drill-Down" to the Joint Use table and see the record. Is there a part I am missing or did not do?
... View more
11-20-2024
01:29 PM
|
0
|
1
|
1202
|
|
POST
|
Good Morning: I am working on adding our Joint Use (Telecomm and fiber) to my Electric Utility Network. I have our poles added to the Structure Junction Feature Class - Medium Voltage & Low Voltage Pole Group(s). I've started appending the Joint Use Data from my existing GDB table into the Joint Use Utility Network GDB table. Figured out how to take the pole GlobalID and assign it to the table field to associate the record in the table to the pole in the feature class. However, I am getting this message in the Attributes box: Some poles may have multiple fiber/telecom joint use attachments and we need to be able to see them. In my previous GDB, I had a relationship class to do that. However, little confused how to do this same thing in the Utility Network. Reason why I am setting this up is because I've been asked to work with the ESRI Joint Use Solutions package to implement a new Joint Use Tracking/Review application. @RobertKrisher Appreciate any feedback.
... View more
11-20-2024
07:50 AM
|
0
|
3
|
1219
|
|
POST
|
Ended up contacting ESRI Tech Support and issued a trouble ticket for review.
... View more
11-13-2024
11:27 AM
|
0
|
0
|
667
|
|
POST
|
I understand ESRI did an AGOL update last night. This morning, one of our Superintendents was saying they cannot update the Status of the Assignments from the Workforce Hosted Feature Layer within an AGOL Web Map, even though they have editing powers. I thought this was a specific domain native to the Feature Layer that is created when a new Workforce project is created, and we have (as operators/admins) not control over. Any thoughts how we resolve this? @JeffShaner
... View more
11-13-2024
08:20 AM
|
0
|
1
|
699
|
|
POST
|
@RobertAnderson3 @IsmaelChivite @ZacharySutherby @JenniferAcunto There must be something I am missing. Using Power Automate, I keep getting an error message while using the ArcGIS Connector (orange) saying I need a Premium License. However, according to my knowledge, the ArcGIS for Microsoft 365 accepts a Creator ESRI license type. Is there a setting within Power Automate I need to update, even though I used my ESRI login credentials.
... View more
11-08-2024
08:55 AM
|
0
|
1
|
2834
|
|
POST
|
@RobertAnderson3 Thank you for the information. Appears I need to #1 talk with my IT Officer about our Power Automate License(s) before I can continue development. I see there is more that I can use. Thank You for the feedback
... View more
11-07-2024
10:26 AM
|
1
|
0
|
2847
|
|
POST
|
@RobertAnderson3 Thank you for the response. Can you clarify and point me in the right direction on what you are explaining? What I need to do is when the attributes are updated, lets say via ArcGIS Pro/Python script, to a Survey123 form, Power Automate is initiated to create a report. I have the flow configured, its the webhook and updating an existing survey/form from ArcGIS Pro that is the missing piece.
... View more
11-05-2024
11:24 AM
|
0
|
3
|
2872
|
|
POST
|
UPDATE: @IsmaelChivite @ZacharySutherby @JenniferAcunto I have a Power Automate flow created that a PDF report is created (Action) when a form is submitted (Trigger). Works fine. Also, as part of the webhook, if the data is edited/updated from the Survey123 app or website, the Power Automate Flow will execute and produce another PDF report. HOWEVER: I have had to build a sub-process that exports the data from the AGOL portal to my local drive, run some data modifications and uploads the data from ArcGIS Pro back to the AGOL portal by using the Append tool. My thought was update/append/webhook Existing record edited would all mean the same time. Apparently not. If I run a geoprocessing tool from ArcGIS Pro and/or Python script, how can I set the webhook or Power Automate Trigger to execute the flow???? Any advice
... View more
10-24-2024
01:52 PM
|
0
|
7
|
3012
|
|
POST
|
I have a DTSX package created in Visual Studio and wondering if there is a way to execute the package thru a Python script? It basically takes an Excel spreadsheet import, runs a derived Column tool and exports the results to a new Excel spreadsheet. Thank You
... View more
10-24-2024
07:03 AM
|
0
|
0
|
517
|
|
POST
|
@Robert_LeClair @DanPatterson Thank you for the information. I've tried the script you sent, and also found another script: with arcpy.da.SearchCursor(feature_class, [date_field]) as cursor:
max_date = None
for row in cursor:
date_value = row[0]
if max_date is None or date_value > max_date:
max_date = date_value
print("Maximum date: ", max_date)
arcpy.SelectLayerByAttribute_management(feature_class, "NEW_SELECTION", date_value)
arcpy.conversion.ExportFeatures(feature_class, layername_export)
print("EXPORT") Both of the scripts exports all of the rows from the feature class to a new feature class. The goal is to only select and export the newest date regardless if there is 1 feature or 200 features in the feature class. As time progresses, this feature class is going to grow overtime and the next script(s) will rely on having (1) record and it needs to be the most recent record. Question, does that need to be a DATE_ONLY field type or is it okay to be a DATE-TIME field type? Not sure if this makes a difference.
... View more
10-21-2024
09:21 AM
|
0
|
1
|
1456
|
|
POST
|
There is nothing more frustrating in working with a GDB FC/Table then dealing with a date field. I am simply trying to run a Select Layer by Attribute tool via Python to select the most recent date in a file GDB feature class in a date field type. All my research have failed in being successful. I have a Make Feature Layer and Select Layer by Attribute tool. The recent expression: arcpy.management.SelectLayerByAttribute(SURVEY123_EWO_REGULAR_HOURS_FL, "NEW_SELECTION", "date_ewo = (SELECT MAX(date_ewo) FROM SURVEY123_EWO_REGULAR_HOURS)") Presently, I have (3) entries in the Feature Layer and still the selection exports all (3) entries versus just (1). In the future, this FC is going to grow and I need to be able to select the most recent entry each time I run the tool. Appreciate any help
... View more
10-15-2024
01:05 PM
|
1
|
3
|
1548
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-23-2026 10:58 AM | |
| 1 | 11-20-2025 02:52 PM | |
| 1 | 10-30-2025 12:42 PM | |
| 1 | 10-16-2025 10:51 AM | |
| 1 | 08-27-2025 08:47 AM |
| Online Status |
Online
|
| Date Last Visited |
4 hours ago
|