I am making an inspection form for people to fill out. There are a lot of questions that are highly likely to stay the same every inspection. I want to be able to autopopulate the field with their previous answer.
With a test survey, I successfully got it to pull the submitted data from the feature layer and bring it into the survey. However, when I add a new survey response with different answers it does not update. For example I did one survey with ID 1 and blue, then that worked but after doing ID 1 with green it still displayed blue.
I have it sorted by an automatic now() datetime. I also have looked in the test query and tested to see the most recent response with the same sort parameters and the output was correct. I attached an image of my form, I'm sorry it is not the correct format - I'm not sure how to upload it as a document preview of the xlsx form!
Any help would be appreciated. Thank you!
Sounds like a caching issue. There are some post around that try to deal with it.
https://community.esri.com/t5/arcgis-survey123-questions/pulldata-layer-caches-values/td-p/1326369
Thank you! I tried all of the suggestions in those posts. Unfortunately, it didn't work. I'm not sure if it's a cache issue though because if I deleted the first response, then it updates to what was the second response.
In that case, maybe try sorting by a different field, You could try descending on objectid or creationdate and see if that makes a difference.
I have tried both of those. I was also pretty sure I could confirm that it should be ordered correctly because I ran a sample query. I am stumped! Thank you though.
@allyf Just noticed you have your sort and records at the end of your query, they should be part of the url. Try this:
pulldata("@layer", "getValue", "attributes.select_q", "<url>?orderByFields=Current_DT DESC&resultRecordCount=1", ${whclause1})
(Request parameters section)