|
POST
|
If the update needs to be instantaneous I would recommend looking into webhooks, which can be configured to run every time a feature is submitted. You would need access to a tool like Microsoft Power Automate or Integromat to do so though. Documentation on webhooks here: https://developers.arcgis.com/rest/services-reference/online/web-hooks-feature-service-.htm Alternatively if it could be on an hourly or daily update, I would recommend using ArcGIS Notebooks in AGOL to accomplish this, as you can set them to run on a schedule. This page https://developers.arcgis.com/python/guide/editing-features/ has examples on how to query and add data to feature services using the API for Python, it can take a little bit of getting used to but it works pretty effectively. Hope that helps!
... View more
12-14-2022
01:57 PM
|
0
|
0
|
750
|
|
POST
|
Hi Marla, Are both the feature class and table hosted in ArcGIS Online or is the feature class local and the table hosted in AGOL?
... View more
12-14-2022
01:19 PM
|
0
|
2
|
753
|
|
POST
|
Agree with the above poster, not easy to do with the calculations in Survey123. If you don't need the user to be seeing the values in that format within the form itself I would consider adding an empty hidden text field after the select multiple question and having a post processing script (potentially in ArcGIS Notebooks) format it for you, as it would be a lot simpler in Python.
... View more
12-14-2022
01:14 PM
|
1
|
0
|
939
|
|
POST
|
I'm not sure how row 4 or 5 are running correctly in that code, but if it works for you I'm glad it's sorted!
... View more
12-13-2022
04:16 PM
|
0
|
0
|
1332
|
|
POST
|
I think the code I posted should do exactly that then. The third row of your code (4th of mine) should determine whether or not there is a value in the date field, and then if it's got a value of "Verified" then write "Yes Verified, with date" to the update field, and if there's no value in the date field then it will default to "Not Verified, no date". The only thing that is missing is handling cases where there is a date but no "Verified" value, is that possible in your data?
... View more
12-13-2022
03:44 PM
|
0
|
0
|
1340
|
|
POST
|
Couple things to clarify from the above code. The first update cursor (rows 2-4) doesn't seem necessary as it is just a repeat of the lines below? A single "=" is used to assign a value, you need to use "==" to test for equality (e.g. row 7) On row 7 it appears you're trying to check the "Verified" field but referring to row[0], when it should be row[1] In row 8 you're trying to test to see whether the date field has a value in it, but you've already done this in line 6 There seems to be a lot of repetition post row 17 Are you just wanting to print the dates and not do anything with them? If so you could just do print(row[0].strftime("%m/%d/%Y")) Based on my interpretation of the code you'd and your description something like this should work, assuming that the only two options for the update field are "Yes Verified, with date" and "Not Verified, no date". from datetime import datetime
with arcpy.da.UpdateCursor(lyr,['datefield', 'Verified', 'update']) as cursor:
for row in cursor:
if row[0] not in (""," ",None):
print(row[0].strftime("%m/%d/%Y")
if row[1] == "Verified":
row[2] = "Yes Verified, with date"
else:
row[2] = "Not Verified, no date"
cursor.updaterow(row)
... View more
12-13-2022
02:27 PM
|
1
|
4
|
1355
|
|
POST
|
I don't believe so no, it's been a couple years since I tried to do what you're doing but I'm pretty sure I found it was impossible, unless you formatted the whole popup as HTML.
... View more
12-12-2022
02:43 PM
|
1
|
2
|
2851
|
|
POST
|
You could definitely accomplish that with the second part of my recommendation! Create two expressions, one that returns "No shelter plan" and one that return "Shelter plan completed" or something along those lines, then add both to a text box at the bottom and add the url that you want them to visit as a link for the "Shelter plan completed" arcade expression and no link for the "No shelter plan".
... View more
12-12-2022
02:14 PM
|
1
|
4
|
2859
|
|
POST
|
Hi Tim, You can simply return the url as text without the HTML code you've got there and it will appear in the popup as a link with the default caption "View". Alternatively what you could do is have an attribute expression that returns a text value of "Link to xx", and then add a "Text" section at the bottom of your popup referencing that expression, and add a hyperlink to the site you want to direct users to (not in the arcade expression or HTML, just using the default "add a link" part of the text editor). That way if the shelter pre-plan doesn't have a value the text/link won't appear. Hope that all makes sense, happy to elaborate if need be!
... View more
12-12-2022
01:42 PM
|
1
|
6
|
2866
|
|
POST
|
No worries, glad to hear it's working now! You can replace "lyr.title" with "lyr.url" to print out the url of a layer. Best to do it in an if statement like so: if hasattr(lyr, "url"):
print(lyr.url) as there are some layer types that don't have "url" attribute (for example, vector tile services have a 'styleUrl' instead) and if you don't have that step then the code will fail when it hits one of those layers. Also note that this simple bit of code above to print out the layers in a map doesn't handle group layers, I'd have to fetch another couple lines of code to deal with that if you need that functionality.
... View more
12-12-2022
01:24 PM
|
1
|
3
|
1668
|
|
POST
|
Hi, It looks to me like there was an issue with the copy pasting of the code - try deleting the whole line "print(lyr.title)" and re-typing it manually, and let me know if that resolves it!
... View more
12-06-2022
11:55 AM
|
1
|
5
|
1679
|
|
POST
|
Not on 11.0 personally but if it's similar to ArcGIS Online then in the group settings under Group Membership there is an setting called "Who can be in this group?", which can either be set to "My organization's members only" or "Any organization's members". For us this is what defines whether the "Any organization: This group allows members from any organization?" icon appears or not. Hope that helps!
... View more
11-23-2022
12:57 PM
|
1
|
0
|
2652
|
|
POST
|
Hi Kayden, sorry for the delay, didn't see your message until now. I've had this issue in the past with vector tile layers (possibly from the basemap?) as they have an attribute called "styleUrl" instead of "url", which you could handle with some code like this: if layer['layerType'] == "VectorTileLayer":
print(layer.styleUrl)
else:
print(layer.url)
... View more
07-17-2022
05:28 PM
|
0
|
0
|
4258
|
|
POST
|
No worries Clive, Glad I could help out! Regards, Josh
... View more
12-18-2020
09:49 AM
|
0
|
0
|
2356
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-22-2023 10:37 PM | |
| 1 | 04-05-2023 11:09 PM | |
| 1 | 05-21-2024 10:26 PM | |
| 1 | 04-20-2023 12:05 AM | |
| 1 | 05-21-2023 10:47 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-20-2025
08:52 AM
|