query allowUpdates not working

686
8
01-09-2019 02:30 AM
Highlighted
New Contributor II

Hi,

query allowUpdates is not working now. It was working before and suddenly stopped working. I am using Survey 123 Version 3.1.158

Any suggestion. Find attached my excel sheet

Best,

Oussama

Tags (1)
Reply
0 Kudos
8 Replies
Highlighted
Esri Esteemed Contributor

Hi Oussama,

By 'suddenly stopped working', was there no change in app version (i.e., going from 3.0 to 3.1)?  Also, have there been any changes to the feature service properties?

Reply
0 Kudos
Highlighted
New Contributor II

Dear james,

yes i think we were using 3.1.149 and moved to 3.1.158.

how can we solve it.

best,

oussama

Sent from my Samsung Galaxy smartphone.

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Hi Oussama,

The documentation for editing repeats via the Inbox can be found here: Prepare for editing existing survey data—Survey123 for ArcGIS | ArcGIS . The correct syntax to query repeat records and allow updates is:

query allowUpdates=true

I took a look at your xlsx file and it is missing the =true after allowUpdates, and as the default is false, updates will not be allowed. Is this the problem you are encountering or are you not seeing any repeat records in the survey?

Please try updating this syntax and hopefully you can edit and update repeat records in your survey.

Regards,

Phil.

Highlighted
Occasional Contributor

Hello i have tried this request : 

allowUpdates=true query="bac_statut<>'retrait'"

is the != <> operator supported?

which are the supported operators in the query parameter?

notice that it works in the query windows of the rest service.

the request look like this in the xml of the redownload form

<bind esri:parameters="allowUpdates=true query=&quot;bac_statut&lt;&gt;'retrait'&quot;" nodeset="/DMA_PAV/GRP_BAC/REP_PAC"/>

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Delaere,

Have you tried the query at the feature service's query operation in the REST API and confirm it works there?  I would expect the substitution of characters with &XX; that you see - those are standard XML escape characters.

James

Reply
0 Kudos
Highlighted
Occasional Contributor

Hi james,

yes i tried this in the where clause

and i get the good result

I use the double quotes after the query parameter.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Delaere,

Can I ask that you try the query at the parent layer's 'Query Related records' entry?  I'm finding that if the query field is NULL, the feature is omitted from the query.  For example, this screenshot should have returned 16 records, but 14 of them have null for the field weather:

Reply
0 Kudos
Highlighted
Occasional Contributor

Hi James,

thanks for answer,

i tried the folowing syntax : allowUpdates=true query="bac_statut in ('projet','déployé')"

and it works fine.

Reply
0 Kudos