POST
|
Thank you @jcarlson and @SteveCole for both of your replies. I had to slightly tweak the above code but I got it to work. I probably should have mentioned I am working in Classic viewer, the below code is what I got to work. var spacedHazards = Replace($feature.hazards, '_', ' ') return Replace(spacedHazards, ',', '\n') Thank you both again!
... View more
04-24-2024
05:29 AM
|
1
|
0
|
699
|
POST
|
Hello all, I have a Survey123 form that has a question that allows multiple answers. When the survey is submitted the field (Hazards) where the answers are input shows each value, separated by a comma (see screenshot below). For example some of the possible answers are Roof_Open, Holes_in_floor, Hazardous_Material. I would like the popup to display each of the answers on a new line so instead of being a list separated by commas, as shown above, it would appears as: Hazards: Roof_Open Holes_in_floor I have tried creating an Array and then concatenating with the TexFormatting.NewLine but have not had any luck. Any insight would be greatly appreciated!
... View more
04-22-2024
12:16 PM
|
0
|
3
|
802
|
POST
|
ahh i forgot to run that cell first! Your workflow worked like a charm. Thank you!
... View more
12-18-2023
12:13 PM
|
0
|
1
|
1260
|
POST
|
I created a field in my hosted feature service that matches exactly to assignment type in workforce but had no luck. Since there are only about 10 items i would need to have assignments created for so I don't think it would be a huge lift to copy and paste this section of code 10 times. I was looking over your code and was wondering where and at what point do you define garbage_cans? thank you again for your help!
... View more
12-18-2023
10:59 AM
|
0
|
3
|
1264
|
POST
|
I have been attempting to create workforce assignments based on values of an existing feature layer on AGOL. I followed the workflow described in this blog: https://community.esri.com/t5/arcgis-workforce-blog/automate-workforce-with-arcgis-api-for-python/ba-p/887570 The section of code where assignments are supposed to be created is: assignments = [] for feature in pr: assignments.append( workforce.Assignment( project, geometry=feature.geometry, location=feature.attributes["locdesc"], description=feature.attributes["details"], assignment_type="Inspect Trees", status="unassigned" ) ) project.assignments.batch_add(assignments) In the code from shown above I changed assignment_type="Inspect Trees"] to assignment_type=feature.attributes["AssignType"] in hopes I could take values from my existing feature layer that are stored in the AssignType field and create assignments based on those. I made sure the assignment types matched exactly to what are stored in my feature layer (example 1=Abandoned Car in both the workforce layer and my feature layer). However, when I try to run the block of code I get the following error: ValidationError Traceback (most recent call last)
/tmp/ipykernel_28/1267473057.py in <cell line: 2>()
2 for feature in pr:
3 assignments.append(
----> 4 workforce.Assignment( 5 project,
6 geometry=feature.geometry,
/opt/conda/lib/python3.9/site-packages/arcgis/apps/workforce/assignment.py in __init__(self, project, feature, geometry, assignment_type, assigned_date, assignment_read, completed_date, declined_comment, declined_date, description, dispatcher, due_date, in_progress_date, location, notes, paused_date, priority, status, work_order_id, worker)
188 self.status = status
189 self.work_order_id = work_order_id
--> 190 self.assignment_type = assignment_type
191 self.dispatcher = dispatcher
192 self.worker = worker
/opt/conda/lib/python3.9/site-packages/arcgis/apps/workforce/assignment.py in assignment_type(self, value)
380 self._assignment_type = self.project._cached_assignment_types[value]
381 else:
--> 382 raise ValidationError("Invalid Assignment Type", self)
383 elif isinstance(value, str):
384 for at in self.project._cached_assignment_types.values():
ValidationError: Invalid Assignment Type When I hard code it assignments are created without any issue but instead of creating assignments based on what value is stored in my feature classes, I get assignments that are all the same. Any insight would be greatly appreciated.
... View more
12-15-2023
02:05 PM
|
0
|
5
|
1384
|
POST
|
Hello Katherine, I realize this is an old post but i was hoping you might clarify something for me. I have used it successfully to find what what Web Maps are being used but when I use it to try to find Applications I did not get any results (when i know I should). I saw in your post you showed a web map example, have you successfully been able to find apps as well? If so you, do you know what may be causing me not to find ID in any app? Thank you for all the time and effort you have put into this script Best, Ari
... View more
09-06-2023
09:22 AM
|
0
|
2
|
2606
|
POST
|
I would like to have the ability in a web map to select a parcel and then pass the parcel's Parcel ID (stored in the {PARCEL_ID} field) into the search bar of an external website AND have that record automatically searched, instead of having to manually click on magnifying glass ; thus automatically displaying any pertinent information for the selected parcel. See below for visual aid. I'm not sure if this is even possible using arcade or some sort of HTML but if anyone could offer an guidance it would be greatly appreciated!
... View more
08-11-2023
12:29 PM
|
2
|
2
|
439
|
POST
|
My "Current Lexington building Structures" is our live and current building structure feature layer that resides in our enterprise sde. After re-reading your post, you would need to publish your parcel and related table as a hosted feature layer and create a hosted view while on your portal. If you are using the related table for all your symbology settings you would need to Truncate/Delete table of hosted layer and Append newly updated info to the now empty hosted table. Once the hosted table has had the new info Appended to it, it will all feed down to the view. You may not actually even need to create a view if you use workflow I described above. You may just be able to work directly on hosted layer and not have to worry about your symbology be messed up because you aren't technically overwriting the layer
... View more
08-03-2023
10:08 AM
|
0
|
0
|
546
|
POST
|
@AngelaSchirck A potential workaround I have used on AGOL would be to publish your parcel layer to your portal as a hosted feature layer and then create a view; configure the hosted view how you want it. Once everything is published go into Pro and open model builder. Use Delete Rows or Truncate Table GP tool (I have had better luck with Delete Rows, though it takes longer) to remove all records from hosted parcel layer. Then use the Append GP tool to append your current parcel data to the hosted layer. You can then schedule your model to run in Pro at whatever time/interval you decide. This process will allow you to update your parcel data with the latest and greatest and have edits feed down to the hosted view layer while keeping all your formatting the way you want. I have included a screen shot of what model would look like in Pro (in my case for updating building footprints). Hope this helps as a workaround!
... View more
08-02-2023
06:58 AM
|
1
|
1
|
563
|
POST
|
Hey @Oliver_Sandoval_e I found more of a workaround as opposed to a solution. I spoke with folks from power engineers, who have intimate knowledge of Cityworks and who we contract to help our organization implement different aspects of CW and this is what we came up with... The first issue we discovered that the comments that are added in the comments section of Service Requests are actually kept in a separate table and therefore need to be accessed differently. We tried several attempts to to link the comments table so when a comment was added it would automatically update the feature service on AGOL, but were unsuccessful. Due to there not being a webhook that would work when a Service Requests was simply updated we decided to use an existing field in the service request to use for comments meant for citizens that was linked to an Action Event for when service requests had a status change (see screen shot below). In our case we used a field called ProbLocation which is designed for description of the location but in this case was not being used for that purpose. While this is not ideal, I was able to get comments to come over from CW to AGOL when a service request's status is updated. Hope this helps. Ari
... View more
01-13-2023
07:04 AM
|
1
|
2
|
853
|
POST
|
I'm not entirely sure if this belongs here but thought I would give it a try... I have taken Esri's citizen problem reporter and used scripts to create service requests in Cityworks (CW). Within CW I have created one webhook that will update a status field on the hosted feature layer in AGOL when it is changed in CW. I am now attempting to create another webhook that will automatically push over any comments made in the Service Request in CW to a 'Notes' field in the AGOL feature layer. However, when I add a comment in CW I receive an error: {"error":{"code":400,"message":"Cannot perform operation. Invalid operation parameters.","details":["'features' parameter in invalid","Invalid JSON primitive: ."]}} The webhook is written as such: features=[{attributes:{REPORTID:~~Requestid~~, {OBJECTID:~~Text1~~, NOTES:"~~Comments~~"} }]&f=json I am very new to webhooks, so if anyone has any insight it would be greatly appreciated!
... View more
11-29-2022
12:39 PM
|
1
|
4
|
912
|
POST
|
I realize this is an old post but i was trying to do something similar to this but I was trying to symbolize layers differently for records that were created a week or more ago; using creatdt field created from applying editor tracking. I attempted to modify above script and inserted "week" where "year" is but it is still symbolizing features that were created today. Am i missing something or is this script not meant for what i'm trying to do.
... View more
09-06-2022
10:11 AM
|
0
|
0
|
967
|
IDEA
|
It would save a ton of time if the Export Layer Style that exists in ArcMap was included in Pro
... View more
07-14-2022
09:53 AM
|
1
|
5
|
734
|
POST
|
We are getting ready to deploy the Citizen Problem reporter for the city and have integrated it with Cityworks, which will be our service request/work order management system; instead of the Problem Reporter Management App. We will have a script that will run once an hour that will look for any new reports that have been submitted and create a Service Request in Cityworks; at the same time assigning a SR ID to each feature. Once we launch the app, one thing we do not want to happen is to have multiple people report the same issue multiple times (i.e. have 30 people report the same pothole). I am trying to figure out the best way to avoid this. Has anyone ever implemented an app of this nature and if so how did you avoid getting multiple requests for the same issue? I am thinking of trying to use a geofence of some type or perhaps try to do a buffer but I'm honestly not sure what the best approach would be. Any insight would be greatly appreciated!!
... View more
03-22-2022
07:52 AM
|
1
|
0
|
476
|
POST
|
Something similar happened to me and it ended up being my project; it somehow got corrupted. I created an entirely new project and that fixed the issue. Give it a try and see if that solves the issue!
... View more
01-18-2022
08:23 AM
|
0
|
0
|
730
|
Title | Kudos | Posted |
---|---|---|
1 | 12-07-2021 06:58 AM | |
1 | 04-24-2024 05:29 AM | |
2 | 08-11-2023 12:29 PM | |
1 | 08-02-2023 06:58 AM | |
1 | 01-13-2023 07:04 AM |
Online Status |
Offline
|
Date Last Visited |
06-07-2024
10:02 PM
|