Clear out the latitude and longitude

Prev Next

QB Maps checks the latitude and longitude of a record first, so a change to the address doesn't always get noticed by QB Maps.

If you want the latitude and longitude of the record to reset when the address is updated, follow these steps to set it up.

Get your Pipelines account slug

Go into your Pipelines account. Go to My Preferences, which is in the dropdown under the part that says Hi, [Your Name].

Find a Quickbase account that has already been set up, and get its account slug. Make sure that the user token used in that account has access to the app you are running this in.

If you do not already have a Quickbase account set up in Pipelines, you can quickly create a new pipeline, select the Quickbase dropdown, then follow the steps to connect Quickbase, then check your preferences again.

For more information, see how to get your pipeline slug.

Import the pipeline template

Go to the My Pipelines page, and select the downward arrow beside Create Pipeline. Then select Import Pipeline. A pop-up will appear. In the black box, copy and paste the following text into it:

Import Pipeline dialog box with a text field for pasting the pipeline template.

Tip

# QB Maps Clear Lat and Long
#
# Clears the latitude and longitude of a record if the address changes.
#

# Account slugs:
#  - quickbase[xxxxxxx]: Account Slug
#    <None>
---
- META:
    name: QB Maps Clear Lat and Long
    description: Clears the latitude and longitude of a record if the address changes.
- TRIGGER quickbase[xxxxxxx] record on_update -> a:
    export_fields: '"Latitude" <29, 30>'
    table: '"App Name: Table Name" <bxxxxxxx>'
    trigger_fields: '"Address" <59>'
    ___: ___
- a<>ACTION quickbase record update -> b:
    ___: ___
    latitude: '{{CLEAR}}'
    longitude: '{{CLEAR}}'
...

Imported Quickbase Pipelines workflow showing the trigger and action steps to clear latitude and longitude.

Replace the placeholder values

Once you have pasted this in, you need to replace some of this data.

  • Replace the text highlighted in green with the account slug you found earlier.
  • Replace the two numbers in blue with the fids of the latitude and longitude fields.
  • Replace the text in red with the dbid of the table that stores the latitude and longitude.
  • Replace the value in yellow with the fid of the address field.

Turn on the pipeline

Select the Import Pipeline button, then turn on the pipeline.

This clears out the latitude and longitude whenever the address field changes. The next time QB Maps runs for that record, it gets a new latitude and longitude for that address.