Select to view content in your preferred language

Using Search appearance for multiple filters

192
6
02-07-2025 09:41 AM
JoseBarrios1
Frequent Contributor

Hi everyone,

I’m working in Survey123 Connect and trying to filter results using multiple fields in a nonspatial table. I’m using the search() function with the matches search type, but adding more than one filter doesn’t seem to work.

Here’s the expression I’m using that works with a single filter but it is NOT filtering for  'nestStatus', 'Active')

autocomplete search("nestList?url=https://services.arcgis.com/QVEHDdaPbd4LUkLV/arcgis/rest/services/survey123_6034521f27692961a4cc75c6...", 'matches', 'zone_ID', ${zoneName}, 'nest_Found_Year', '2025', 'nestStatus', 'Active')

Any suggestion???

0 Kudos
6 Replies
ToddW_stl
Esri Contributor

Have you consulted these docs yet?

I wasn't aware you could add multiple filter matches (like zone_ID and nest_Found_Year in your example) - so that's kinda neat.  In my second bullet point, it says "You can optionally append query request parameters to the REST endpoint of your feature layer or map service layers to configure the search behavior."  Not sure if that would be an option.  Is nestStatus a text field, or perhaps coded value domain, so the string 'Active' is not matching anything?

0 Kudos
JoseBarrios1
Frequent Contributor

Hi ToddW_stl,

Thanks for your input! I noticed that when I remove the first filter ('nest_Found_Year', '2025'), the second filter ('nestStatus', 'Active') works perfectly. This confirms that the nestStatus field (which is a text field) is set up correctly. I'm now wondering if the search method is limited to only one filter parameter!

 

JB

0 Kudos
ToddW_stl
Esri Contributor

That's what I'm thinking.  I didn't realize at first your zones were searchColumn/searchText and the nest year/status were filterColumn/filterText.

for your url, I'd try to add the nestStatus query at the end.

url=https://<your_service>/<layer_index_number>/query?where=neststatus='Active'

see the first query parameter on this example

 

0 Kudos
JoseBarrios1
Frequent Contributor

Thanks Todd for your suggestion! I did try your approach and I can query the layer without the filters at the end. The query parameter just get ignored when I use the filters at the end of the search expression.

0 Kudos
ToddW_stl
Esri Contributor

So my nestStatus=Active doesn't work at the end?  Can you use the REST endpoint to build a query?

0 Kudos
JoseBarrios1
Frequent Contributor

Yes, I can run the query at the  REST endpoint. It just don't work inside the search appearance syntax!

0 Kudos