Select to view content in your preferred language

Regenerate a pulldata() inside the Survey123 form

534
2
Jump to solution
11-23-2024 03:48 AM
Davide_Pili
Occasional Contributor

Hello everyone,
I am using Survey123 Connect version 3.20.63.

I have created a field that is populated using a pulldata().

The pulldata() retrieves the maximum value of a field from the Survey's Feature Layer. This value is used by a second field and incremented by one. The retrieval works, but after the first submission, the pulldata() is not updated. I need to close the Survey123 app and reopen it for the pulldata() to regenerate. I read that the pulldata() does not regenerate within the same session, but perhaps I haven’t come across any updated articles.

Is there any functionality or trigger I can include in my xlsForm?

Thank you.

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Frequent Contributor

Survey123 is designed to cache the request.

You can work around it by adding something that will always not use the cache to the request, e.g. relative time.

Add now() to your query:

https://support.esri.com/en-us/bug/the-calculation-does-not-recognize-that-a-new-feature-i-bug-00015...

It's similar behaviour to elsewhere in ArcGIS (using time based queries like this is less performance efficient).

View solution in original post

2 Replies
ChristopherCounsell
MVP Frequent Contributor

Survey123 is designed to cache the request.

You can work around it by adding something that will always not use the cache to the request, e.g. relative time.

Add now() to your query:

https://support.esri.com/en-us/bug/the-calculation-does-not-recognize-that-a-new-feature-i-bug-00015...

It's similar behaviour to elsewhere in ArcGIS (using time based queries like this is less performance efficient).

Davide_Pili
Occasional Contributor

Thanks @ChristopherCounsell 

This solution worked. I added the parameter t=now(), and the pulldata() updates.

0 Kudos