Hoppa till huvudinnehållet

How to query multiple parcels from user input string?

Kommentarer

4 kommentarer

  • Permanently deleted user

    @Doug Guess? Yes, could do this by using a Split method to break the value into a list with commas as the separators, and a Join method to combine the list back into a string with ',' as the separator. Or a text replace that replaces , with ',' could also work if you don't need to do anything fancy with that list of values. I've attached a quick example with Geocortex Workflow - use File >Import to import it, and then run it in the Sandbox.

    0
  • Permanently deleted user

    Thanks for the reply Amanda. I'm using Workflow Designer, not Workflow 5. Can I still utilize your sample?

    0
  • Berend Veldkamp

    In workflow 4 you could take a similar approach, the most straightforward way would be something like this:

    where = "PARCELID IN ('" & userIds.Replace(",", "','") & "')"

     

    Or, if you don't want to be too strict on the specific format a users types in, you could fix extra whitespace and trailing or double comma's by doing something like this:

    where = "PARCELID IN (" & String.Join(",", userIds.Split({","c}, StringSplitOptions.RemoveEmptyEntries).Select(Function(id) "'" & id.Trim() & "'")) & ")"

     

     

    0
  • Permanently deleted user

    Berend,

    That worked perfectly! thanks

    0

Du måste logga in om du vill lämna en kommentar.