Inbox bind::esri:parameters query syntax

242
3
09-04-2019 02:27 PM
Highlighted
New Contributor II

Hello all (James Tedrick)

I have a question about bind::esri:parameters query syntax.  Is there a way to query from more than one field with an OR operator?  Background below...

My organization does environmental testing for various diseases. To do this, I have created a complex set of forms with nested repeats that all submit to the same feature service.  There are a set of forms that submit test result data for surveys that were already submitted by field workers.  We have a couple of different laboratories that will use separate forms to submit test result data by editing already submitted data using the inbox.  However, I am trying to have the test result forms pull only relevant data given the diseases that were selected to be tested and the labs that are submitting the data (our labs test for different diseases).

For example, there are 6 diseases for which we test, but for a particular form I may only want to pull data for diseases 1 and 2.  The form used by the field workers has a Disease field that is selected by a select_multiple question, which is then parsed into separate hidden questions (e.g., disease1, disease2, disease3, etc.) for querying.

How do I set up a query in the bind::esri:parameter column to pull data from more than one column or category?  When I have something like query="disease1='disease1'" it works like a charm.  However, when I try and add another part to the query using an OR operator I get an error code.  For example, query="disease1='disease1' OR disease2='disease2'" doesn't work (I get a 400 error code when attempting to refresh the inbox).

Any help would be appreciated.

Thanks!

Reply
0 Kudos
3 Replies
Highlighted
Esri Frequent Contributor

Hi Greg,

Please refer to the documentation here on the correct syntax to use in where clause for the Inbox: Prepare for editing existing survey data—Survey123 for ArcGIS | ArcGIS 

If you are referring to just querying repeat records when Inbox is refreshed, this is documented here: Prepare for editing existing survey data—Survey123 for ArcGIS | ArcGIS 

Regards,

Phil.

Reply
0 Kudos
Highlighted
Occasional Contributor

Hi Phil,

I have the same query as Greg in that I need to be able to filter out records from the repeat in the inbox that fulfil more than one query. In my case I have a status field and need to be able to filter out records classed as "defunct" or "complete", however, I'm not sure what the syntax in the bind::esri:parameters column should be. Everything I've tried throws up the 400 error code. If I separate them out as separate queries only the last query seems to be applied.

I checked the documentation you linked to above but it doesn't indicate how to create a query using the OR operator. Is this possible and if not do you know if there is an alternative syntax?

Thanks for your help.

Kind Regards

Anthony

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Hi Anthony,

Can you provide an example of the type of query syntax you are trying to use, also a copy of your xlsx file if possible. 

It could be that you are trying to use more advanced SQL logic, have you tried with Standardized Query disabled in your Org. See the caution note in the doc links above:

Regards,

Phil.

Reply
0 Kudos