|
POST
|
I was hoping to do this with Arcade and Geometry($feature).X But, even though this "looks" like it will get the geometry of the feature, it actually gets the geometry of the feature location in the basemap. In other words, even this will produce coordinates of the basemap system regardless of what the data is in. Seems I remember a basic script out there to convert to WGS84, but not to a projected CS. The only way I have found to accomplish this is to create my own basemaps in the coordinate system of my data, and use these basemaps in the map viewers. Then, if I have two fields (X,Y), I can have the Field Maps form calculate the X and Y of each feature using the above Geometry functions. R_
... View more
04-26-2023
10:25 AM
|
1
|
1
|
2361
|
|
POST
|
legend item don't show all availiable classes in your layer, rather show all the symbol classes you have set up in symbology. If you remove the filtered out classes from the symbology, they will not show in the legend. R_
... View more
04-26-2023
09:40 AM
|
3
|
0
|
2421
|
|
POST
|
Adding the modification before the When statement woudl break it and stop the script from running the rest of code, so you can ignore that since you have other updates as well. So, this when statement: var inspection_status= When(
$feature.InspectionReason == "Condition Rating" && $feature.OtherDrainageRatable == "Yes", "Inspection Completed",
$feature.InspectionReason == "Condition Rating" && $feature.OtherDrainageRatable != "Yes", "Inspection Attempted",
$feature.InspectionReason == "Maintenance Activity", $feature.ConditionInspectionStatus, 'valueifnomatch' ) will set the value of the varible inspection_staus = 'Inspection Completed" when InspectionReason (IR) = 'Condition Rating" and Other DrainageRatable (ODR) = "Yes". If IR = 'Condition Rating" and ODR NOT equal to 'Yes", then inspection_status is set to "Inspection Attempted". If IR = 'Maintenance Activity", the variable inspection_status is set equal to the current value in "ConditionInspectionStatus" for that feature (so, no change). The 'valueifnomatch' (formerly null) is the value that inspection_status is set to if NONE of the When statements are true. Often this is null, but can be any valid result. Even if not used (never evaluates to false), it still needs to be there as the When statement needs the default value to be valid syntax. Could alway set it to $feature.ConditionInspectionStatus, that way, if NONE of the When statements evalueate to True, it will return the value currenlty there, so no change. So, the update will happen on the field regardless of the value of InspectionReason, just that if it is "Maintennace Activity", it will be "updated" the the value that is already there, so no actual change to the value. R_
... View more
04-24-2023
01:28 PM
|
0
|
0
|
1805
|
|
POST
|
Suspect maybe the way you are "getting" the feature layer isn't supported for the append tool. When I append from HFS to local FGDB, I just use something like: import arcpy
from arcgis.gis import GIS
arcpy.env.preserveGlobalIds = True
fc = r"C:\temp\gdb.sde\GISDB.GIS.TARGET_FC"
gis = GIS(url='https://yourorghere.maps.arcgis.com/', username='AdminUser', password='UsersPass')
in_lyr = 'https://services3.arcgis.com/5asfasga45zb/arcgis/rest/services/GMTest/FeatureServer/1'
#arcpy.management.TruncateTable(fc)
arcpy.Append_management(in_lyr, fc, "NO_TEST") R_
... View more
04-24-2023
12:02 PM
|
0
|
0
|
1830
|
|
POST
|
You are not establishing the connection to your AGOL portal (when logged in in Pro, that is automagic). Maybe something like (you supply username and password, but need to identify portal URL): #connect to ArcGIS Online
agol = GIS(url='https://yourorg.maps.arcgis.com/',username="username",password="password") R_
... View more
04-24-2023
10:28 AM
|
0
|
1
|
1840
|
|
POST
|
I have seen this issue when there are more than one tiled layer in the map (including basemap), and the tiling scheme and generated tiles is not the same. R_
... View more
04-24-2023
10:19 AM
|
1
|
0
|
1283
|
|
POST
|
You can create it with Map Viewer Classic and Web App Builder. That share widget does exactly that. R_
... View more
04-21-2023
02:44 PM
|
0
|
0
|
1081
|
|
POST
|
In Desktop, I often just select one feature, then export to new featureclass to maintain all the schema info, then delete the one feature to have new dataset with matching schema. Not sure if this would work for you, but could you use the API to make a copy of the feature services, truncate the data, then export to FGDB (which is now pretty much just the schema) which could then be copied locally, and exported to xml. R_
... View more
04-20-2023
03:47 PM
|
1
|
0
|
2704
|
|
POST
|
They really messup up the access to REST service through item details a couple "udates" ago, especially with secure services. So, now if it is secured (not avail to public), you need to do the r-click thing to get it to pass token properly and forward you to the correct server. The link you post in the init.json to the HFS will not load in a browser directly without the token required message if your service is not public. However, the script also passes the credentials of user in your org with access to it, so the token is generated behind the scene, and the script should have access. R_
... View more
04-20-2023
01:09 PM
|
0
|
1
|
1247
|
|
POST
|
Use the copy icon below the View. This should give the full https://services7.arcgis.com/..../FeatureServer url. You will then need to pass an AGOL username and password that has access to that feature service in the init.json or you will get token issues. R_
... View more
04-20-2023
01:04 PM
|
0
|
1
|
1250
|
|
POST
|
After your second example, right click on the >service_...... at the top and open in new window/tab. RhettZufelt_0-1682020317789.png R_
... View more
04-20-2023
12:52 PM
|
0
|
4
|
2402
|
|
POST
|
Are you using your internal smtp server and just changed to gmail as that is sensitive? I ask, as there are specific instructions in the original post of how to configure if using gmail. Other than that, I see you have serviceuser and servicepw in the init.json set to an email, and smtp. This needs to be the AGOL username and password that has access to the service (otherwise, token errors). Also, the serviceuser does not have quotes around it, which causes it to throw the exact error of you earlier post (why it is not parsing the json correctly). RhettZufelt_0-1682019486375.png R_
... View more
04-20-2023
12:38 PM
|
0
|
2
|
2413
|
|
POST
|
Agreed, unless the "simple attibute info" is always the same for each feature type (and not too many of them). Then Quick Capture really shines. R_
... View more
04-20-2023
12:16 PM
|
0
|
0
|
1216
|
|
POST
|
You should not make any changes to the python script, just the init.json file. Yes, that is the correct URL to put in there, but, the HFS will also have at least one layer in it. This script monitors for changes in a layer in the HFS, so you need to supply the layer number for the fsLayerNum: in the json file. Here is my file with sensitive info changed: RhettZufelt_0-1682016177115.png I use internal mail server, with no issues (set in the "email" portion of the json file "server": ). Once it runs correctly, or at least creates the layergens file, you will see that file appear in the 'generations' folder. AND, if you make any changes to the init.json after running it, you will need to delete the layergens file that gets created there or you may get errors. (it is specific for the single layer from the HFS that is configured in the init.json) the "serviceuser": and "servicepw" need to be a user that has access to that service. However, based on the last error message you provided, I don't think it is getting that far. Seems there is something wrong with the init.json file. In python window, you should be able to put the following code: import os
import json
os.chdir(r'C:\CD')
cfile = 'init.json'
json.load(open(cfile)) That should print the contents of the init.json file as a json string. If it doesn't, or errors out, this is where the problem lies. Once you get past that, will be easier to troubleshoot (if needed). R_
... View more
04-20-2023
12:02 PM
|
0
|
1
|
2423
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-14-2026 04:00 PM | |
| 1 | 09-14-2022 07:53 AM | |
| 1 | 09-14-2022 08:23 AM | |
| 1 | 05-21-2026 08:53 AM | |
| 1 | 05-14-2026 04:28 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|