Predicate expressions
  • I am trying to do a "Search by Zip Code" that is able to detect "nearby" zips.
    Example: I search "10002" I would like to find all zipcodes thats start with "100".
    Kevin said I should I use VaeQL so, I implemented the change and searched for the substr of the requested zip code.

    This is what gets outputted
    so the full line of markup would read:

    <v:collection path="stores[postal_code='100']">

    My question is, is Vae capable of searching a string that doesnt match the full string of a dataset? Can it find all the zip codes in my collection that start with "100" when searching for 10002?


  • 1 Answer sorted by
  • You should be able to use the XPath substring function.

    path="stores[substring(postal_code, 1, 3)='100']"

    If that doesn't work, try:

    path="stores[substring(postal_code, 0, 3)='100']"

    I'm not 100% sure the syntax of that function.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion