Select to view content in your preferred language

One pulldata statement, with a where clause and multiple filters

874
1
Jump to solution
11-01-2023 11:20 AM
Labels (1)
JayHodny
Frequent Contributor

Hello!  I am trying to figure out how to write a pulldata function that has two feature filters, I assume placed in the WHERE clause.  I am building a refuse cart solution that tracks cart type (trash, recycle, yardwaste), cart size, cart serial number, etc. in Survey123 Connect (on Enterprise Portal 10.9.1).  The original feature class contains three records per property, one record for each cart type, from which I published a feature service to our federated Server.  I am using the pulldata @layer workflow and would like to filter on cart_type first, based on the choice in a select_one question, then filter on the address field, thus retrieving that one unique record from the service table.  Is this possible to do in one pulldata statement?  Any help, example code, workflow, etc. would be appreciated.  Many thanks, Jay

0 Kudos
1 Solution

Accepted Solutions
JayHodny
Frequent Contributor

UPDATE: I can now choose cart type, enter an address, and have the record associated with the cart type and its location (geometry) retrieved. After tinkering with the Calculation, Choice_Filter, Relevant, etc. options in Connect, I ended up adding search parameters to my 'autocomplete search' function in the Appearance option: autocomplete search("address?url=https://yourserviceurl/FeatureServer/0",'contains','cart_type',${cart_type}).  I also had to increase the "max record count returned by the Server" service to be able to access the 20,000+ records.  Data retrieval time remains fast.

For more information on Search Appearance....

View solution in original post

0 Kudos
1 Reply
JayHodny
Frequent Contributor

UPDATE: I can now choose cart type, enter an address, and have the record associated with the cart type and its location (geometry) retrieved. After tinkering with the Calculation, Choice_Filter, Relevant, etc. options in Connect, I ended up adding search parameters to my 'autocomplete search' function in the Appearance option: autocomplete search("address?url=https://yourserviceurl/FeatureServer/0",'contains','cart_type',${cart_type}).  I also had to increase the "max record count returned by the Server" service to be able to access the 20,000+ records.  Data retrieval time remains fast.

For more information on Search Appearance....

0 Kudos