POST
|
It appears that the issues I was having were related to my system environment variables. With all of the installs of python floating around it was a bit confusing setting this up. On my server machine I have Python 2.7 installed with ArcGIS Desktop, Python 3.6.6 installed with ArcGIS Pro, and Python 3.7.1 installed with Anaconda. I also have a ArcGIS Pro clone that installs python in yet another location. So, I have reset my system environment path variable to C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3, C:\Program Files\ArcGIS\Pro\bin\Python\Scripts, and C:\Python27. At this point everything appears to run correctly no matter which command line I use. Are these the recommended path variable settings? Previously I had the paths set to C:\ProgramData\Anaconda3, C:\ProgramData\Anaconda3\Scripts, and C:\Python27.
... View more
02-22-2019
10:06 AM
|
0
|
0
|
562
|
POST
|
That is what has been so frustrating, is that it should be just that simple. So, I have now fixed the issue, but still have questions. I had installed pro, and then later installed python using the Anaconda Distribution. I was under the impression that I could use either python installation interchangeably, right? When I setup my task I pointed my "Program/Script" text box to C:\ProgramData\Anaconda3\python.exe, which did not work. I am not sure if it is a factor, but the default location that Anaconda 3.7 installs, also happens to be within a hidden folder (ProgramData). It wasn't until I changed the "Program/Script" section of Task Scheduler to "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" that it worked. All arguments were passed in without quotes, and everything is now working as expected. So why can't I execute from python.exe in the Anaconda3 folder? Also, I am still having trouble running the workforce scripts straight from a standard Command Prompt. Each time I try to run the script from there I get an Import Error for module import_ssl (see below). Again, I haven't modified the underlying script (delete_assignments.py). Instead, I am just passing the parameters through. Any ideas on why this doesn't work? Is there something obvious that I am missing? Anyway, thanks for all your help on this Aaron!
... View more
02-22-2019
07:39 AM
|
0
|
1
|
562
|
POST
|
That's a good question. I am running Windows Server 2016, and have noticed that privileges seem to matter a lot more on this new OS. So, when I run the script manually using Anaconda Prompt or Python Command Prompt I always need to right click and "run as administrator" in order for the script to succeed; if not it seems to fail when attempting to write to the log file on C:. My task is set to run with highest privileges, but not sure if that equates to run as administrator or not. That said, I am an administrator on this server. Just verified that by pulling up my account settings on the machine and can see the Administrator title below my username.
... View more
02-21-2019
03:09 PM
|
0
|
0
|
562
|
POST
|
Hi Aaron, How would the arguments look in the Task Scheduler? I am used to running batch files that call python and list the arguments directly in the batch, but just opening cmd and running the example code isn't working for me. The scripts only appear to work when running in the Anaconda Prompt. Since the script works just fine when running it manually, I guess I need to open the Anaconda Prompt within Task Scheduler, but then just need direction on how to add the following arguments. -u username -p password -org "https://<org>.maps.arcgis.com" -project-id "038a1926d2d741dc8acabefd5b2cc5d3" -log-file "../log.txt" -where "1=1" I am including the full path to the script as the first parameter as you advised, but not sure how the quotes affect task scheduler. So far I am loading them into the argument text box exactly as the example shows in the line above/on your Git site. Any help would be appreciated.
... View more
02-21-2019
01:23 PM
|
0
|
5
|
1697
|
POST
|
Thanks James! Your timing is impeccable. So it looks like the response I was typing out as you were also answering this question appear to be more or less on the right track. Glad to know there is a solution for it and I will look at testing this down the road, but for now I am moving on since attachments aren't needed for this specific project.
... View more
02-04-2019
03:45 PM
|
0
|
0
|
2374
|
POST
|
Rather than leave this hanging out here unresolved, I will attempt to answer my own question, but please keep in mind that I have yet to test it out, because the capability of adding image attachments is no longer required for this particular project. However, if inquiring minds would like to know I will share how this might be accomplished in Integromat. It appears that all the attachment attribute data needed to build a functioning URL to allow an attachment to stream-in does not get pushed to the webhooks payload by default, or at least I couldn't find it even with all the Survey123 webhooks "Event data" items checked on. Maybe I missed something, but I didn't see a way to construct a dynamic URL directly from the payload. So, perhaps the better way to make this work is to use Integromat's HTTP module to leverage specific calls using the ArcGIS REST API. Again I have not tested this, but in my example from the OP above you would need to do two HTTP requests: 1) generate a token, and 2) get the specified dynamic parts of the attachment URL. Once those pieces have been retrieved then in the Elado one could create the image URL and use the Integromat Iterator to add images if there were more than one to add. Additionally, you would want to add repeats in the Elado template maker to handle multiple images as well. I am a little unsure about how to get the attachment ID numbers, but I did see that in the webhooks payload both GlobalIDs and parentGlobalIDs come through for the attachments, so that could be a possible way to get the relevant attachment IDs for the URL. Also, there is an UploadID field, which might prove useful in getting an answer. When all is said and done you should have a URL resembling the following below. On paper, this seems to make sense, but again the challenge will be to get the right attachment IDs that are relevant to the correct images.
... View more
02-04-2019
03:41 PM
|
1
|
1
|
2374
|
POST
|
I am attempting to use webhooks to retrieve a payload of submitted survey attributes, generate them into a PDF using Integromat and the Eledo PDF generator integration, and then send the PDF as an email attachment. So far all of this works pretty seamlessly. The only issue I have is that the feature service's related table that my surveys stem from has attachments enabled, which I would like to have added to the PDF as a dynamic image (or more advanced repeating dynamic images if more than one photo exists in the array). I can set the Eledo PDF template to use an Image Type of URL (preferred), or Image. However, I can't seem to get any of this to work, and I don't see enough information coming through the payload to figure it out. Additionally, making matters a bit more challenged is that my published service is not shared publicly. Has anyone attempted to do this? I like this route better than building reports in Survey123 or printing directly from the Survey123 website, since using webhooks makes it happen at submission time and doesn't require any manual steps. I had thought about using the REST endpoint of the service URL with something like Query Attachments, but I still wasn't seeing how to extract the image URL going that route, and I believe I will need to generate tokens as well. Any thoughts, tips, or advice would be extremely helpful.
... View more
01-31-2019
05:21 PM
|
3
|
6
|
3755
|
POST
|
Hi Robert, Expand is perfect!!! Exactly what I was looking for! map.setExtent(resultExtent.expand(1.4)); is what I went with. ******Correct answer******
... View more
01-18-2019
03:36 PM
|
0
|
0
|
236
|
POST
|
Thanks so much! I will experiment with that. You are right might feel a bit jerky.
... View more
01-18-2019
02:40 PM
|
0
|
0
|
236
|
POST
|
It's a parcel map service, so I was just going to pick a scale that I know would function for our largest acreage parcels. Not a perfect solution, but I am not seeing a better workaround. I pretty much hate the graphicsExtent(features) solution, and I would rather have the geographic context while potentially being zoomed out too far. I was going to go with happy medium of say, 1:2,257 or 1:1,128. Ideally, it would be nice if the size of the parcel being selected could somehow factor into what scale gets selected. Perhaps, a few area related if statements....
... View more
01-18-2019
02:08 PM
|
0
|
3
|
1195
|
POST
|
Hi Robert, Looks like I rushed my comment too fast. So I suppose just disregard my previous comment. Instead, what would the code in the else statement of the selectFeatures function look like assuming I would like to zoom to the feature passed in by the query parameter, but only to a specific scale. Is there a way to the resultExtent variable with a combining of specific scale level, but also ensuring the graphicsExtent(features) is also centered? The way it sits unmodified the scale is more or less dependent on the screen size/shape.
... View more
01-18-2019
12:57 PM
|
0
|
5
|
1195
|
POST
|
Hi Robert, Thanks for pointing out where to modify the code, but do you have a solution for adjusting the scale in the jimu.js/MapUrlParamsHandler.js selectFeatures function when the url parameters are querying against a polygon map service? It would be so easy to set this up if it were point geometry like the solution Suzanne suggested, but unfortunately that won't work for polygons. Thanks
... View more
01-18-2019
12:04 PM
|
0
|
6
|
1195
|
POST
|
Doug thanks so much for getting back to me on this! "Also you are not going to use the Inbox feature. Not sure where this part came from." That came from Esri support when they were working with me on implementing this setup back in 2017. I will just ignore that step going forward. "Also using Gloabal ID can be funky (but I think not anymore). I would use another key." I was using Ismael's blog post "Working with existing Feature Services in Survey123 for ArcGIS" as my reference, which seemed to mandate using GlobalIDs for the keys (see screen shot below of the pre-requisites). I typically use GlobalIDs for all my relationship classes as they are the most unique field type. Anyway, thanks for the suggestions, and I will be in touch should I get into more trouble with this.
... View more
01-16-2019
01:48 PM
|
1
|
0
|
2916
|
POST
|
Hi Doug, I had attempted to do something similar in the spring of 2017, but at the time that effort was met with a bug in Survey123 software that didn't allow using forms as related records. Like you I love the idea of merging map centric (collector) with form centric (Survey123). Now that it seems this workflow is possible I am excited to revisit this once again. Unfortunately, the workflow I was going by still doesn't seem to be working out. In researching that I came upon your workflow, which you seem to have had success with, but I was hoping for some clarification on a few of the steps. 1. Create the form and publish. 2. Download the form feature service as a gdb. 3. Create a new GDB in catalog - this holds your collector features. 4. Add the FS that collector is going to use (point, line, whatever). Add a key field to the collector class then pass this value to Survey123 (like you have been doing). 5. Copy the Survey123 FC you downloaded into the collector gdb. 6. Create a Relationship class from the Collector FC to the Survey123 FC. 7. Publish this gdb as a service. Do you mean that the Geodatabase need to be published as a Geodata Service? 8. Go into the Survey123 form and set the submission_url to the new HFS you just published. By HFS do you mean set the submission_url to service url of the Geodata Service? 9. Republish the form. In case you are wondering below are steps for the previous workflow I was using that still hasn't quite worked: Steps in ArcMap/Catalog: In a file geodatabase or an enterprise geodatabase, create a new point feature class. Add global ID’s to this feature class Create a new table in the geodatabase. Add a GUID field. Create a relationship class between the feature class and the table: Origin table/feature class is the point feature class; Destination is the table Can use a simple relationship or composite relationship Where the labels are specified in the relationship class, it’s important for Survey123 that these have the same name It’s ok to set the messages to “None” 1:M cardinality “No, I do not want to add attributes to this relationship class” The primary key for the origin is the GlobalID, the foreign key for the table is the GUID field Add FC and Table to ArcMap and publish as a HFS Steps in Survey123: Launch Survey123 Connect: Click New Survey > Click the radio button "Feature Service" > Click the feature service published from the data created in the first part of this document > Create Survey In Survey123 Connect click the "Settings" button > Inbox > Enable "Inbox mode" > Disable the setting to "Apply a spatial filter when the map view of surveys is visible" Publish this survey to ArcGIS Online Steps in AGOL: Create a web map and add the published HFS to the web map Configure the popup to use URL Scheming to open Survey123, pass the Global ID field to the GUID field, pass any other parameters as necessary Save web map Open in Collector and Done! Any help would be appreciated. I really want this to work!!!
... View more
01-16-2019
11:53 AM
|
0
|
2
|
11781
|
POST
|
False Alarm. I believe that my Chrome browser just went to lunch. As is typical for me, I have a billion open tabs at all times, and usually they remain open for days on end. I believe that the browser just needed to be completely closed and that would have solved the issues I was seeing in Chrome. However, for those of you looking for a complete listing of the myriad of ways to control user caches (in IIS at least) this documentation lists them all. My plan going forward will be to use the "Set Common HTTP Response Headers" in IIS manager and set the "Expire Web Content" to immediately (A.K.A. No Cache) on an individual application or on all of them depending on what has been updated, and then leave that in place for at least a few weeks to ensure that most if not all users will get the refresh. Once satisfied that everyone is now pointing at the newest version then I will simply flip the IIS setting back to once again improve application performance. Hope that helps
... View more
01-09-2019
11:52 AM
|
0
|
0
|
7489
|
Title | Kudos | Posted |
---|---|---|
1 | 02-28-2024 01:41 PM | |
3 | 01-07-2021 02:35 PM | |
1 | 01-06-2021 03:03 PM | |
1 | 08-17-2021 02:52 PM | |
2 | 08-17-2021 09:31 AM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|