POST
|
Thanks again Doug, very good point. I'm planning to use the pulldata("@property", 'mode') calculation on a hidden/null question to assign the survey mode to a variable, then use that variable in the relevant column for the second geopoint and the lat/long fields populated from it (e.g., ${survey_mode}!='edit')). This way those fields will only be calculated on initial submission.
... View more
Friday
|
1
|
0
|
44
|
POST
|
@DougBrowning Setting the default to 0,0 still placed the second geopoint on the ¢er= value. However, setting calculate to null and bind::esri:parameters to calculationMode=always (then making the second geopoint required) worked for me. Thanks for putting me on the right track.
... View more
Friday
|
1
|
2
|
55
|
POST
|
Thanks Doug. Looks like we won't be able to hide the question in that case, since the user will still need to click the locate button to populate the lat-long fields. This may be as good as it gets - at least we won't risk the user submitting the asset location on the second geopoint, so thanks. Thanks for the other tips as well; we need the survey points to be coincident with the asset for this particular application but that's good to keep in mind for future applications.
... View more
a week ago
|
0
|
0
|
103
|
POST
|
I have a survey with two geopoint questions: The first geopoint represents the location of an asset in the field and is set by using the center parameter of the Survey123 URL scheme, and this is submitted as the geometry value for the the survey point. The user clicks a point in Field Maps, then the lat/long from that point is passed to the URL in the popup to become the survey point geometry. In other words, the survey point geometry is identical to the geometry of the clicked point in Field Maps. So far so good. For the second geopoint question, we want to grab the device location and write lat/long to fields in the table. So we set the bind::esri:fieldType to null and set a calculation on two decimal fields using pulldata from the second geopoint. The issue is that the "center" parameter seems to set the location of both geopoints when the survey is opened, rather than just setting the location of the non-null (default) geopoint question. If the user clicks the locate button on the second geopoint, it recalculates and the correct values are passed to the decimal fields. But we need to automatically grab the device location without relying on the user clicking the second geopoint question (in fact, we would prefer to hide it entirely) to reset the location. Is there a solution to this?
... View more
a week ago
|
0
|
5
|
206
|
BLOG
|
@TomScavo @jsarthur If you’re the item owner, you should be able to change this on the item settings page by unchecking “Allow others to export to different formats”. A couple of caveats though: 1. This takes away the option to export as file geodatabase, and 2. All exports will be in WKID 4326 (KML is always 4326 anyway, but this forces 4326 on shapefiles etc as well, ignoring the Local Projections setting).
... View more
2 weeks ago
|
0
|
0
|
392
|
POST
|
Hi Sean, here's how we do that: Add ¢er=<lat>,<long> to the end of the link that opens Survey123 (ex: ¢er=40.3798956137812,-122.98043757805). On the geopoint question in your survey's XLSform, set required=yes, readonly=yes, and default=null. You'll need to use an Arcade expression to get the lat-long values. If your Field Maps point data happens to be in 4326 (WGS 84), you can just add "¢er=" + Geometry($feature).y + ',' + Geometry($feature).x to the expression that builds your link (or if you happen to already have lat/long values elsewhere in the table, you can just use those, of course). If your Field Maps point data is in another projection, it gets a bit trickier because you have to convert to lat/long. Let me know if this is the case and I'll see if I can help you convert those values in your popup.
... View more
3 weeks ago
|
0
|
0
|
178
|
BLOG
|
@jsarthur @TomScavo I happened to notice that disabling extract on the feature service forces the old download sidebar and brings back the KML download option, at least for now. Hopefully KML will be added back to the new download experience.
... View more
3 weeks ago
|
6
|
0
|
751
|
POST
|
Same issue here. @sredar's workaround is great for my current project (thanks), but there are lots of other cases where arcpy isn't available and I need to get an access token from the GIS object.
... View more
a month ago
|
0
|
0
|
93
|
POST
|
Hi Tyler - good solution, thanks. The buttons still show on the form, but it gives an error on submission if you try to add or delete a related record.
... View more
03-01-2024
03:21 PM
|
0
|
0
|
117
|
POST
|
We are attempting to design a survey to be accessed via web form that allows review of survey records previously submitted from the field. To do this, I've created two surveys, one for field collection via the mobile app, and a second one that points to the same feature service using the submission URL parameter, with all fields set to read only with the exception of a few additional fields for entering review information. This works fine, except that the repeats are still editable in the sense that they can be deleted or added using the buttons in the web form: We can imperfectly get around accidental additions by making the fields in the repeat required and read-only (so it won't let them submit), but it seems that reviewers are still able to delete records from the repeat using the trash can button. I've tried setting the [begin repeat] line to read-only, and have also tried setting the [bind::esri:parameters] column on the [begin repeat] line to allowUpdates=false and allowAdds=false, and neither seems to have any effect. Is there any way to allow the repeats to be shown on the web form but not allow them to be added to or deleted?
... View more
02-29-2024
09:47 AM
|
0
|
3
|
242
|
POST
|
Thanks Michael, this was super helpful and got my script working. To piggyback on this, if retrieving the index name programmatically is desired, you can do it like this: import requests
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
gis = GIS(portal_url, username, password)
token = gis._con.token
item = gis.content.get(item_id)
layer_index = 0
service_definition_url = f"{item.url}/{layer_index}/?token={token}&f=json"
response = requests.get(service_definition_url)
service_definition = response.json()
for index in service_definition["indexes"]:
if index["fields"].lower() == "shape":
shape_index_name = index["name"]
break
flc = FeatureLayerCollection.fromitem(item)
update_dict = {"indexes":[{"name": shape_index_name,
"fields": "Shape"}]}
result = flc.layers[layer_index].manager.update_definition(update_dict)
if result:
print(f"\nSpatial index successfully rebuilt for {item.title} ({item.id}), Layer {layer_index}")
... View more
02-08-2024
06:15 PM
|
1
|
0
|
352
|
POST
|
Thanks again, Chris. The Windows 11 devices where it's failing are not mobile devices (they are both Dell XPS notebooks). Would I need to open a support ticket to get these device types added to the bug description (or logged as a new one)?
... View more
02-01-2024
09:29 AM
|
0
|
1
|
539
|
POST
|
Hi Chris, Thanks for the reply. I tested on the five devices I have available; here are the results: Windows 10 (Edge 121.0.2277.83): App works as expected! Windows 11 (Edge 120.0.2210.144): Issue persists Windows 11 (Firefox 122.0): Issue persists iPad running iOS 15.6.1 (Safari): Issue persists iPhone running iOS 17.0 (Safari): Issue persists I noticed that when I enter full screen on the one device that works, I get the "Press Esc to exit full screen" modal, but this doesn't happen on the other Windows devices.
... View more
02-01-2024
09:13 AM
|
0
|
3
|
548
|
POST
|
Hi Chris, Yes, I'm using AGOL. Here is an example: Address & Parcel Viewer (arcgis.com) I see the same behavior in Edge and Firefox on Windows, as well as Safari on iOS.
... View more
02-01-2024
07:26 AM
|
0
|
5
|
563
|
POST
|
Hi Aaron, this will delete a specific user's map areas. I've found the user.items() query to be lacking as well, so I always query user items with gis.content.search, like so: from arcgis.gis import GIS
gis = GIS("home")
username_to_search = ''
user_map_areas = gis.content.search(query=f"owner:{username_to_search}",
item_type='Map Area',
max_items=10000
)
for area in user_map_areas:
try:
delete_result = area.delete()
if delete_result:
print(f"Map area '{area.title}' ({area.id}) deleted.")
except Exception as e:
print(f"! Deletion failed for map area '{area.title}' ({area.id}). Exception: {e}")
... View more
01-31-2024
08:16 PM
|
0
|
0
|
274
|
Title | Kudos | Posted |
---|---|---|
1 | Friday | |
1 | Friday | |
6 | 3 weeks ago | |
1 | 02-08-2024 06:15 PM | |
2 | 01-31-2024 07:23 AM |
Online Status |
Offline
|
Date Last Visited |
Monday
|