The Pulldata function doesn't work on newly submitted data until restart of Survey123 application.

526
6
05-11-2023 04:14 AM
HOEOEK
by
New Contributor II

Hello!

I use the Pulldata function to retrieve the ID from a layer that is the same layer that the form is built on. The ID that it retrieves is created in the form and this pulldata function simply checks whether the ID exists or not.

It works except when you make a form, write an ID, submit, then fill in a new form, it can't retrieve the last ID that was created, but it reaches all the other IDs.
After restarting the application, it can retrieve all the IDs that are created.


Anyone know what this is due to? It is as if Survey123 loads the layer when starting the Survey123 aplication and then does not reach the newly created data added after the start of the application.

Tags (2)
0 Kudos
6 Replies
ChristopherCounsell
MVP Regular Contributor

It should query the layer via the server, not reference the other surveys on the device. 

Do you get the issue if you wait until the record ID has been submitted (i.e. visible in the ArcGIS Online Hosted Feature Layer) and then open the survey form? Without restarting the app?

Have you hit submit and immediately opened a new survey?

It sounds like there is a slight overlap between the survey being submitted (creating the record) and opening a new survey. You could try resolving it using the bind parameter calculationMode=Always. This will run your pulldata calculation again when the survey submits - recalculating the ID value with the latest possible pulldata@layer request.

Not convinced that an app restart would cause anything outside of just waiting for the survey form to have actually completely sent. If it's explicitly this, I'd recommend sharing your XLSForm so the Survey123 team can reproduce.

0 Kudos
HOEOEK
by
New Contributor II

Yes, I can see the data in the layerbefore I click on new Survey.

Unfortunately "bind parameter calculationMode=Always" didn't do anything.

I also find it strange that the only thing that solves the problem is a restart of the Survey123 application.

0 Kudos
ChristopherCounsell
MVP Regular Contributor
Can you please confirm the version of the survey form, and survey123 field
app?

Please also share the XLSForm.
0 Kudos
HOEOEK
by
New Contributor II

ArcGIS Survey123 5.4.142
ArcGIS Survey123 Connect 3.16.105

I tried running the form in the web app and it works fine there.
It feels like it has something to do with the cache memory when using the desktop app.

ChristopherCounsell
MVP Regular Contributor

The 5.4.142 is the app framework version. Can you grab the version at the top of the page?

I'm on version 3.17.68 for android.

For Survey123 Connect, version 3.17.55.

Bit short on time to test your issue with your build (the service doesn't appear to be publicly accessible).

My recommendations are:

  1. Not use 'ID' as a field name as it appears as a reserved word. This often means you can publish and collect data without issue, but at some stage you encounter an issue, as you cross platforms/databases/OS that can't interact well with that specific word as a field name. Not saying it's your issue here. 
  2. Update to the latest version of Survey123 Connect and re-publish the survey so it's at the latest form
  3. Update to the latest version of the survey123 field app and re-download the latest version of the form
  4. Enable logging on the Survey123 field app
  5. Try it again to see if the issue persists on the latest version of the app; if unsuccessful
  6. Try again with a publicly accessible service URL
  7. Review logs

Esri support and the Survey123 team will be able to help after the above if it's still occurring. The above will really help as:

  • They only support issues occurring in the latest release, and will want to test on this
  • They'll want steps and a service to reproduce
  • Logs will help expedite the issue significantly

I've got the feeling that your issue is tied to either the version, or possibly the token. The information you gather will help resolve the issue, or identify if it needs to go to the development team who can then explore a fix.

0 Kudos
HOEOEK
by
New Contributor II

Thanks I'll definitely check it out!
My version is the same as yours 3.17.68.

I made the service public now in case you want to test.

0 Kudos