Retrieve all field values using FindTask

Discussion created by babbot on Jun 10, 2011
Latest reply on Jun 13, 2011 by babbot
Hello all,

I'm looking to implement some rudimentary filtering on our map system, to be configured by the user. The use case would be to find all incidents of x, with the attribute y (which can be selected from a dropdown list), from layer z.

Getting layer and attribute info is easy. I can retrieve all field names (via a long-winded and expensive method using featureLayer.Fields), but using a FindTask, I can't search on "everything", so to speak. This means I can't populate the dropdown with all possible values.

Ideally, I'd like to use a FindTask with FindParameters.searchText as "", or "*", but neither of those seem to work.

I realise this is going to be an expensive operation at the server end, so I'll be limiting the opportunities for users to make this sort of call - but at the moment I can't seem to find a way of doing it anyway. Really, I want to avoid having to create SOAP proxy pages, using ajax, and all manner of other convoluted methods!

Cheers, Ben.