I have an existing project that has a few media files. I have frequent updates to these media files as well as occasional form updates. I need a python script that I can run via scheduler that will publish this project nightly. I have read a bunch of posts but cant find anything clearly stated that shows how to do this. Is there anyone out there that can help provide a solution?
I am just trying to figure out what is happening....I dont even know if I can still use this as its from 2017 !!
I'm really confused as to what is going on....I assume that I can use this to update my media files daily if need be.
What is the ago.AGOLHelper
I know I have the correct UserName and Password but I am getting a NULL for the agol_helper.token
agol_helper.token = NULL
agol_helper = ago.AGOLHelper(portal_url) print ("...Authenticating") # login agol_helper.login(credentials['userName'], credentials['passWord']) print ("...Querying") # get the name of the zip file serviceInfo = getServiceDefinition(agol_helper.token, itemID)
There is a new way now using Linked Content. But it may have some issues it looks like. See this post https://community.esri.com/t5/arcgis-survey123-questions/auto-update-select-one-from-file-list-and-t...
The other new way to to link to a feature service but that would require being online. It is in the early adopter only for now.
Hope that helps
There are other things my lists do as in prepopulate etc....
I am looking for an automated process that I can replace the Media Files at will and then automatically republish the project nightly. Preferable from Python script.
You can link all your lists to a stand alone CSV that you store in AGOL. Works just like the media folder but no need to republish. Then you use Python to update that item. The form then sees this change and updates. Check out select_one_from_file.
So right now I have 4 media files. The excel file points to them.
Are there any examples of how to update these tables via python?
It is all in the link above or this one https://community.esri.com/t5/arcgis-survey123-questions/can-a-linked-csv-file-on-agol-be-automatica...
It is actually really easy to link. Then the post I linked above had the python code to update the item in AGOL.
You can use Linked Content to update choice lists from a hosted CSV file everytime the CSV file is updated and the survey info page is accessed. This avoids having to re-publish the survey just to update the choice list.
Please refer to external choice list section in documentation, with explanation about Linked Conent: