Skip to main content
Some choices depend on where the work is. An anchor that is standard in one market is wrong in the next. You can make a dropdown offer only the options that apply at the object’s location, on the web and in the iOS app. It takes two things:
  • A dataset with one row per option, and a column holding the area each option applies to.
  • A filter by this record on the field, which keeps the rows whose area contains the object’s location.

1. Build the dataset

A dataset is a custom type with rows. Give each row: One option that applies in two markets is two rows, one per area. Coordinates are longitude first, the GeoJSON order. Keep boundaries simple: tens or hundreds of points per area is plenty. You can paste rows as JSON or CSV when you create the dataset from a field. In CSV, put the area’s GeoJSON in quotes.

2. Point the field at the dataset

  1. Open the template and select the field.
  2. Open Options. Under Or narrow from a catalog dataset, choose the Dataset.
  3. Pick the Stored column (key) and, if you have one, the Shown column (label).

3. Add the filter

  1. Under Filter by this record, click Add a filter.
  2. Under How to write expressions, choose Offer the rows whose area contains this record and click Use. It inserts:
  3. Describe it in What this does, for example “Anchors for this market”.
  4. Under Try it, enter a latitude and longitude, click Run, and check how many rows are offered.
  5. Click Apply, then save the template.
The !json.location || part offers every option until the object has a location. Leave it out if crews should place the object first.

Narrow further

The filter is plain JavaScript, so it can combine the location with other answers on the same object. For example, to also respect a guy size:
You can also add steps after the filter. The crew then narrows the filtered rows one column at a time.

What crews see

Anchor material picker on iOS listing one option

On the phone, a guy in Cleveland is offered only the Cleveland anchor

  • Only the options that apply at the object’s location.
  • If nothing applies, the field says “No values apply to this record”. A value saved earlier can be removed with Clear.
  • If a saved value is not offered at the object’s current location, it stays and the field asks for a new pick. Nothing is cleared for you.
  • Without steps, crews pick from the whole filtered list, however long it is.
Crews need an iOS app version that supports filtered dropdowns. Older versions show every option.