|
POST
|
I'm trying to develop an immediate calculation attribute rule that finds the closest asset (point) and returns the unique ID to the newly created feature's attribute table (also a point). For starters, I have been using a solved question thread originally posted by @James_Norquest, which can be found here. Here's the code that I've been using: //importing two fields, including geometry of the feature to be analyzed
var closestAsset = FeatureSetByName($datastore, "ClosestAssetFC",["label","type"], true);
//In OP, this is the "meat & potatoes"
var feature_buffer = Buffer($feature, 500, 'feet');
var nearest = First(Intersects(closestAsset, feature_buffer));
return nearest["label"]; When I create a new feature, the field to be populated by the rule returns the same asset ID from the ClosestAssetFC, no matter where I put it. Through some troubleshooting, I found that it was because the entire ClosestAssetFC was being returned by the script, and was only returning the first record, which was the same every time. I'd also like to subset the ClosestAssetFC to only include a specific asset type. Here's the code that I tried: var closestAsset = FeatureSetByName($datastore, "ClosestAssetFC", ["label","type"], true);
var feature_buffer = Buffer($feature, 500, 'feet');
var nearest = Intersects(closestAsset, feature_buffer);
var nearestFilter = Filter(nearest, 'type = "Asset Type 1"');
return First(nearestFilter["label"]); This gives me an error, saying that a dictionary type was expected at line 8. Any advice here would be much appreciated! Best, Mike
... View more
01-13-2022
08:18 AM
|
0
|
1
|
680
|
|
POST
|
@Kanin , Thanks for pointing me in the right direction. Here's the code snippet that I used: from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
from arcgis.mapping import WebMap
gis = GIS("<portal>", "user","pw")
fl_wm_search = gis.content.get("web_map_item_id")
fl_wm_object = WebMap(fl_wm_search)
fl_layers = {item.itemId for item in fl_wm_object.layers}
update_dict = {"viewDefinitionQuery" : "field1 = ''"}
for f in fl_layers:
source_search = gis.content.search(f)[0]
source_flc = FeatureLayerCollection.fromitem(source_search)
new_view = source_flc.manager.create_view(name="{}_Null".format(source_search.title.replace(" ","_")))
view_search = gis.content.search(new_view.title)[0]
view_flc = FeatureLayerCollection.fromitem(view_search)
service_layer = view_flc.layers
for i in range (len(service_layer)):
service_layer[i].manager.update_definition(update_dict)
view_search.move("Home Folder") Happy New Years! Best, Mike
... View more
12-29-2021
11:50 AM
|
1
|
1
|
2594
|
|
POST
|
I have a web map with roughly 50 features and counting. I'm looking for a quick and dirty way to create a view of each layer where a given field is null. The good news is that this field exists in each of the 50 features. Is there an easy way to do this? Thanks! Mike
... View more
12-21-2021
02:24 PM
|
0
|
4
|
2660
|
|
POST
|
Our organization is currently using Integromat for automating Survey123 tasks. We have recently been migrating some of these automation tasks to use Power Automate instead to be more in line with our Office 365 environment. However it appears the organization may soon may be transitioning away from Power Automate, and instead begin using UiPath for all RPA type tasks. My question is does ESRI currently have anything planned for integration with UiPath? For example, a connector to Survey123?
... View more
11-18-2021
06:16 AM
|
0
|
0
|
783
|
|
POST
|
Thanks abureaux. Can you please post the results of your findings with ESRI Support on the Edit & resend issue? I'm sure I'll be running into that too at some point. ESRI Support has diagnosed the issue with the geopoint question and provided a workaround. It has been recorded as a bug, and I have escalated it. #BUG-000143518 Trying to run createReport Request using a token from the generateToken Request Fails The issue is with the token. Using the generateToken API request fails to provide a valid token to access the map required for the createReport function, it only works using the token that was included with the survey submission. So the workaround is to use the token that's included with the submitted survey, not the one created from the generateToken API call. Instead, use the value of Portal Info Token that's included with the survey submission. It works, (it will create the map if a geopoint question is included in the template) however there are some caveats that make it less than ideal. This token expires in 15 minutes, so it's not going to work if your automated report generation is on a schedule longer than that, and if the process fails the token will not be valid for resubmitting. Also, since the token is included as part of the survey submission, it's using the submitters permissions to access and generate the report, meaning that all submitters MUST be included in a group that can access and view the surveys (Share Results in the web app), and the history of the report generation will only be available from the Survey123 web app when logged in as that user. In our environment this workaround is not really feasible. Hopefully the escalated request to resolve this bug will be implemented quickly.
... View more
10-08-2021
06:11 AM
|
1
|
0
|
2904
|
|
POST
|
Thanks for that reply. I'm testing this process using AGOL instead of Portal, but it sounds like exactly the same issue regardless. You indicated this process used to work fairly recently - I'm guessing it broke sometime around September 16, the last major AGOL update by ESRI - does that sound about right? If so, maybe we can pinpoint the issue to something that occurred in that last ESRI update. I'm working with tech support and will post updates to the issue as received.
... View more
10-06-2021
07:19 AM
|
0
|
2
|
2976
|
|
POST
|
Thanks for posting that. I recreated that flow and everything works - except if the report template contains a geopoint type question, then it fails with: ["An error occurred when rendering by the report engine. Failed to print map for `$map_geopoint`. waiting for function failed: timeout 180000ms exceeded"] If I remove the geopoint question from the MS Word feature report template, then it works fine and generates the report from the Flow API request. When the geopoint question is included, the report generates normally without error from the Survey123 web site, but fails if called from the Flow API. I have already opened a support request with ESRI on this issue, but so far we have been unable to resolve this. The query works and everything is returned, but it seems like it cannot access the map used for printing the geopoint in the MS Word feature template. We have tried many things to to resolve this, including adding the webmapItemId and mapScale parameters and trying different formatting of the request within Flow and also using Postman, but nothing seems to work when a geopoint question is included. Just wondering if you or anyone else has tried including a geopoint question in the MS Word feature report and then using the API request from Flow to generate the report. Has anyone successfully done this, had similar issues or found a way to resolve this problem? I'm testing with a report template that is very basic - one question and one geopoint... no repeats or anything.
... View more
10-05-2021
09:05 AM
|
0
|
4
|
2982
|
|
POST
|
Hi Zoltan, Thanks for posting that. I recreated that flow and everything works - except if the report template contains a geopoint type question, then it fails with: ["An error occurred when rendering by the report engine. Failed to print map for `$map_geopoint`. waiting for function failed: timeout 180000ms exceeded"] If I remove the geopoint question from the MS Word feature report template, then it works fine and generates the report from the Flow API request. When the geopoint question is included, the report generates normally without error from the Survey123 web site, but fails if called from the Flow API. I have already opened a support request with ESRI on this issue, but so far we have been unable to resolve this. The query works and everything is returned, but it seems like it cannot access the map used for printing the geopoint in the MS Word feature template. We have tried many things to to resolve this, including adding the webmapItemId and mapScale parameters and trying different formatting of the request within Flow and also using Postman, but nothing seems to work when a geopoint question is included. Just wondering if you or anyone else has tried including a geopoint question in the MS Word feature report and then using the API request from Flow to generate the report. Has anyone successfully done this, had similar issues or found a way to resolve this problem? I'm testing with a report template that is very basic - one question and one geopoint... no repeats or anything.
... View more
10-05-2021
05:21 AM
|
0
|
1
|
2707
|
|
POST
|
The .csv file is loading correctly now - user error on my part.
... View more
09-23-2021
12:28 PM
|
0
|
0
|
2234
|
|
POST
|
Also appears the form has issues loading the associated .csv file from the media folder when trying to edit: Error appears after selecting edit
... View more
09-23-2021
04:25 AM
|
0
|
1
|
2249
|
|
POST
|
I know <body bgcolor="#FBBCBC"><font color="black"><b>Mission Request</b></font></body> is another one that doesn't work any longer.
... View more
09-23-2021
04:22 AM
|
0
|
0
|
2249
|
|
POST
|
Thank you for the reply James. I can easily change the HTML, but that's not the major issue. I've opened up a support ticket for the other issue regarding the inability to edit a form in the web app (following the Sept 16 update) when there is a value in the body::esri:visible field. Any idea what change to the web app may have caused this? I've attached screenshots and examples to my support case here: https://my.esri.com/#/support/cases/02897569
... View more
09-23-2021
04:12 AM
|
0
|
2
|
2252
|
|
POST
|
I've noticed the same thing - the html syntax is no longer respected. But, worse than that it appears in this latest version it no longer respects the value of the body::esri:visible field. It appears these fields are visible, but no longer editable. I have values in there to hide some fields in the field survey, but they need to be visible and editable by approvers in the web form. They appear as visible, but not editable in this latest version of the web form.
... View more
09-22-2021
09:28 AM
|
0
|
0
|
2290
|
|
POST
|
I republished my data from our org's enterprise geodatabase via a SQL Server connection. This resolved the issue.
... View more
09-21-2021
12:11 PM
|
0
|
0
|
823
|
|
POST
|
Hey all, I have a simple arcade expression that calculates an area name string to a point that falls within that area. I'm trying to publish the feature service from Pro 2.8.3, to Portal. The two datasets (point, and poly) are registered datasets on Server 10.8.1. var outerGeom = FeatureSetByName($datastore, "Test_Areas", ["name"])
var featureWithin = Intersects(outerGeom, Geometry($feature))
if(Count(featureWithin) > 0) {
var layer = First(featureWithin);
return layer.name;
} else {
return null;
} I am following the instructions on Share Datasets with Attribute Rules. At step 5, under "Share datasets with attribute rules", it mentions that I have to publish the referenced registered data as a feature, in addition to the map image layer. Am I interpreting that correctly? When I attempt to publish the two features as a web layer, I get an error, suggesting that referenced data is not compatible. To be clear, these datasets are not yet feature services; they reference data stored on the server. (same is true with the polygon feature) The referenced data store points to a folder on the server, where my FGDB (along with several other active registered FGDB's) is/are contained. Can someone help me to understand what it is that I'm doing wrong? Thanks in advance... -MG
... View more
09-15-2021
08:16 AM
|
0
|
1
|
920
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 11-03-2025 11:44 AM | |
| 2 | 10-31-2024 07:02 AM | |
| 1 | 02-02-2024 11:08 AM | |
| 6 | 06-20-2023 06:36 AM | |
| 3 | 01-04-2023 10:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|