Skip to main content

Example of simple filter workflow? (multiple layers)

Comments

3 comments

  • Permanently deleted user

    Hi Rob,

    To filter multiple layers using a workflow, you would start with a DisplayForm activity to allow the user to select the field and/or enter the value to search on. To do the actual filtering, you would need to use multiple Query Task activities (which could be run in Parallel) - one for each layer that you want to search. Each Query Task would be configured almost identically to the others, except that each would search a different layer. You would end up with a feature set for each layer, and need to use a SelectFeatures activity for each one that had features returned in order to populate the Results list.

    It is not currently possible to select multiple results from a drop down box in Workflow. However, you could use a ListBox, and set the Selection Mode to 'Multiple'. This would display a list that you could select multiple values from. If used with layers, the results could be used to determine which QueryTask activities get run (which layers get searched).

    -Victoria

    0
  • Permanently deleted user

    > you could use a ListBox, and set the Selection Mode to 'Multiple'.

    On Victoria comment, I would like to add one more thing: Set the Selection Mode to'Extended' mode to utilize SHIFT/CRTL key to select one or more... See below

    http://msdn.microsoft.com/en-us/library/system.windows.controls.selectionmode(v=vs.110).aspx

    0
  • Permanently deleted user

    Thank you both. I ended up getting the workflow down with the definition query task (I wanted to filter the layer like the advance filter, not return results in the results pane). I'm surprised there is no simple filter tool already like there is a simple query tool. The advanced filter isn't as user friendly for non-GIS people.

    I have not figured out however how to add multiple selections from a listbox into a query. I'd imagine you'd need to do some kind of loop adding OR into the query string between values, or the IN (,,,) format. Are there any examples of using listbox values in a query/filter string?

    The other issue I'm trying to sort out is how to keep the form open when it runs, like how the advanced filter behaves so your values don't disappear and you can modify the selections. But there's another thread about that happening.

    cheers

    0

Please sign in to leave a comment.