POST
|
@TD1 , forgive me for what you may already know here. But here is a possible solution. Run the spatial join to create the new output in a local file GDB. add the hosted feature layer to a map with the new layer created from the spatial join. Use the "Join Field" tool to "Add" the new fields with their values to the hosted feature layer in the "Transfer Method" input, select "Use Field Mapping". This will allow you to only add the specified fields to your hosted layer NOTE: This might not work great if you don't have a unique id column that isn't managed by the database. Sometimes GP tools have an option to preserve GlobalID in the Environment Settings but I don't see it on "Spatial Join". You can't use OBJECTID either because that will have been lost when you run the spatial join.
... View more
3 weeks ago
|
0
|
0
|
285
|
POST
|
@MattCashen, I adapted what @JRhodes posted to mean that we can rebuild any of the indexes from the layer that you want since he showed how to find them. They are also in the properties. You could search through the list and include any or all in your update definition call. from arcgis import GIS
try:
gis = GIS(
'https://somecoolorganization.maps.arcgis.com',
username='phonyusername',
password='neverevergonnahackthis')
hostedItem = gis.content.get("f4k3i13mid1sdf0er293re847we56")
if studentPointsItem:
hostedLayer = hostedItem.layers[0]
# get item Definition
lyrDef = hostedLayer.properties
# get the list of index definitions
idxList = lyrDef.get("indexes")
# find one with a specific field
specIndex = [idx for idx in idxList if 'FullAddress' in idx["fields"]]
# rebuild any index with that field listed
result = hostedLayer.manager.update_definition({"indexes": specIndex})
print(result)
# or update all the indexes for the hosted layer
result = hostedLayer.manager.update_definition({"indexes": idxList})
print(result)
except Exception as ex:
print('Warning: unable to update index(es).')
print(ex)
... View more
07-11-2025
10:21 AM
|
0
|
0
|
520
|
POST
|
Sorry for no response there. It's been long enough that I don't have all the details anymore. The next time I have to do this, I know I'll be coming back here though, since the working status of this seems to change frequently.
... View more
05-16-2025
09:52 AM
|
2
|
0
|
759
|
POST
|
I have accomplished this one way using SharePoint and seen another way possible at our local County Assessor's office. SharePoint Method Adding a field to the feature layer named something like "RelatedDocumentURL" or something like that will allow you to paste in a url for the SharePoint directory containing the related documents. I would ensure that the link to the directory was modified so that users accessing that only had permission to view documents. Otherwise, they end up getting prompted for a login, which fails. After adding these urls to the field for each feature, a popup can display that field value as a hyperlink in various ways. If adding individual links to each parcel sounds nearly impossible... Alternative Method A custom web application that allows navigation by parcel number should be developed. This requires the documents to be stored in a way that is either retrievable from a database or from a web accessible repository by parcel number. Then, in the popups for the parcel layer, you create an attribute expression that builds a url like: var url = "https://domainname.com/" + $feature.parcel_number. Then, add that attribute expression to popups according to the previously linked documentation. Neither of these methods is easier. Both require that the documents be indexed somehow. I feel like the Alternative Method puts the work of organizing documents and providing means of displaying them back in the court of the assessors and clerks and allows GIS admins/analysts to provide a means of referencing them instead of doing much of the job of someone in another role.
... View more
11-22-2024
10:56 AM
|
1
|
0
|
398
|
POST
|
I just tested adding a layer to an existing Hosted Feature Layer through the REST endpoints today and IT IS NOW FIXED! I used the addToDefinition with a JSON containing one layer. After it completed, I refreshed the item's Overview page and the new layer showed up. This is really great. It means AGOL can really be used as an actual Geodatabase for small organizations now. Thank you ESRI!
... View more
11-22-2024
10:40 AM
|
3
|
3
|
1309
|
IDEA
|
I need this as well. I'm considering creating a custom tool for it. I have a frequent need to join measurement records to a point feature class. The point features have siteid and genid. They are dual keyed. To join measurements, I have to do it with python currently. It would be great to be able to just specify more than one join field, similar to what can be done in a sql join statement. I like your idea @MiguelMartinezYordan .
... View more
03-08-2024
11:14 AM
|
0
|
0
|
4255
|
POST
|
If you go through Portal/ArcGIS Online to the Item Overview page and scroll down to the "URL" link, it will open it up in the rest services directory and then you can click "Admin" in the upper right. This window has the token already applied. Use the links at the bottom to "addToDefinition". Also, if it says that the token is expired, refresh the Overview page and repeat those steps.
... View more
08-30-2023
01:51 PM
|
0
|
4
|
12924
|
POST
|
That is a good thought. Although, I'd be worried about the domains being disconnected from the tables in case future changes to the domains occur. XML is a queryable datatype within SQL. For example, in SQL Server, there is documentation on how to do it and plenty of examples of how to join that XML to a table in a query. So I would say this should be possible without making static tables of the domains.
... View more
08-30-2023
09:30 AM
|
0
|
0
|
3228
|
POST
|
It seems like you could join to the lookup table and display the values instead of the codes. It would follow this pattern: SELECT
adhp.name_txt,
adhp.type_code,
adhp.military_code,
--adhpsurfacearea.subtypecode,
LU.subtypevalue,
adhpsurfacearea.globalid,
adhpsurfacearea.length_val,
surfacecharacteristic.composition_code
FROM
adhp
JOIN adhpsurfacearea ON adhp.gfid = adhpsurfacearea.adhp_id
JOIN surfacecharacteristic ON surfacecharacteristic.gfid = adhpsurfacearea.surfacecharacteristic_id
JOIN [SUBTYPECODELOOKUPTABLENAME] LU ON LU.subtypecode = adhpsurfacearea.subtypecode
... View more
08-30-2023
09:23 AM
|
0
|
0
|
866
|
POST
|
I've been working on this too. There is a real need for it since we can't see the future or anticipate all needs of a layer at initial creation. Even ESRI Solutions need extended and they seem to include even the kitchen sink. Here's the best post I've found that even has info about a github repo with samples and a bug that shows a workaround to getting these newly added items to show in portal after adding them through the REST API.
... View more
08-30-2023
09:09 AM
|
9
|
0
|
12964
|
POST
|
I have been having "device keyboard" issues similar to this. It will behave differently on different devices (iPhone, Samsung-android, Google-android). Can you verify that this is happening on all types of devices?
... View more
08-17-2023
11:47 AM
|
0
|
0
|
896
|
POST
|
Any word if this case is resolved. I've just successfully added layers to a hosted feature layer and they show up in the rest services directory but not on the Item overview page.
... View more
08-17-2023
11:37 AM
|
0
|
3
|
5731
|
POST
|
Glad to hear. I feel like there must have been something wrong with my install for it not to have updated that file when I reinstalled. Happy coding!
... View more
02-14-2023
07:21 AM
|
0
|
0
|
12689
|
POST
|
I think this is due to the units of the spatial reference of the data. If the units are degrees, then it won't look like what you're expecting. Right-clicking a column in ArcGIS Pro (you can add the feature service to Pro), you will see an option to "Calculate Geometry". This also lets you choose which projection/spatial reference (and thererefore, units) you want the resulting calculation to be done in. If you pick a local projection that has the units you would prefer, you can ensure to get something useful. There is also a way using Arcade that will allow you to do a field calculation to get the result in your desired units.
... View more
01-19-2023
09:33 AM
|
1
|
1
|
2302
|
Title | Kudos | Posted |
---|---|---|
2 | 05-16-2025 09:52 AM | |
1 | 11-22-2024 10:56 AM | |
3 | 11-22-2024 10:40 AM | |
1 | 02-18-2021 11:26 AM | |
9 | 08-30-2023 09:09 AM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|