Repeat Inbox Where Expression

825
5
09-30-2020 01:48 PM
GlenGardner1
New Contributor III

Can the where clause in the inbox query repeat records? I'm getting a Code 500 error when refreshing the inbox.

0 Kudos
5 Replies
by Anonymous User
Not applicable

Hi Glen,

Yes, you can query repeat records using the bind::esri:parameters column on the begin repeat question type in the XLSForm. See this doc article for more information: Prepare for editing existing survey data—ArcGIS Survey123 | Documentation 

Ae you using AGO or Enterprise (Portal) and if so what version? Are there any other details with the Code 500 error, are you able to enable diagnostic logs and start logging when you refresh the Inbox to see if any additional information in the logs.

Regards,

Phil.

0 Kudos
GlenGardner1
New Contributor III

Hi. Philip,

I didn't have the bind::esri:parameters set to query so I changed it. After republishing the error code changed to 400.

I am publishing to Enterprise (portal) 10.7.1. 

I searched the log for the error(see below). It looks like it wants to search the parent feature service and not the child for the inbox where clause. layer 4 in the URL is the parent not the related table I would like the where clause to limit the inbox to.

PortalRequest: PortalRequest failed url: https://gis.fdacs.gov/mapping/rest/services/DPI/M_INDICA_DPI_PI_PROD/FeatureServer/4/query error: {
"code": 400,
"details": [
"Unable to perform query operation."
],
"message": "Unable to complete operation."

Am i trying to do something that isn't supported or do I have to format the where clause differently? My where clause is inspection_status='pending'. inspection_status is a field in the relate in which I'm trying to store a QA status of a inspection that reoccurs at a location.

Thanks,

Glen

0 Kudos
by Anonymous User
Not applicable

Hi Glen,

What is the exact expression you are using in the bind::esri:parameters column?

It should look similar to: query="inspection_status='pending'"

Also, if you want to allow updating existing records you need to use: allowUpdates=true

By default adding records is allwoed, but if you want to not allow adding new records, you can set that to false.

Regards,

Phil.

0 Kudos
GlenGardner1
New Contributor III

The bind::esri:parameters column is :

query="inspection_status='pending'" allowUpdates=true allowAdds=false

 And my inbox settings are:

0 Kudos
by Anonymous User
Not applicable

Hi Glen,

Which layer is the inspection_status field in? The parent layer or the repeat/related layer?

The "Query expression" in setting for the Inbox applies to parent layer, so any field you query here must be related to a field in the parent layer.

The "query=" in the bind::esri:parameters relates to the repeat/related layer, so any field you query must be related to a field in the repeat/related layer.

Based on your screenshots above you are using the same query in both places, which will only work if there is a field in both parent and repeat called this exact same name.

Regards,

Phil.

0 Kudos