query allowUpdates not working

3288
10
01-09-2019 02:30 AM
OussamaMerhi
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)
0 Kudos
10 Replies
JamesTedrick
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?

0 Kudos
OussamaMerhi
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.

0 Kudos
by Anonymous User
Not applicable

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.

DelaereMickael
Occasional Contributor II

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"/>

0 Kudos
JamesTedrick
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

0 Kudos
DelaereMickael
Occasional Contributor II

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.

0 Kudos
JamesTedrick
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:

DelaereMickael
Occasional Contributor II

Hi James,

thanks for answer,

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

and it works fine.

0 Kudos
CarissaPhantom
New Contributor III

This is working for me: query allowUpdates=false

Now I need to retrieve the last survey taken, and the userID in ${AssignedInspector3} 

Is there a clean way to do this? 

0 Kudos