Skip to main content
Question

Creating a table based upon location relationships

  • July 21, 2017
  • 0 replies
  • 30 views

I am having trouble trying to group rows based upon a table relationship. As of right now i have two tables. Table 1 with specific locations, and Table 2 with rows that i want to be assigned to the locations listed in Table 1. I want to know if its possible to assign the table 2 rows to table 1 based upon the location of the rows in table 2.

For instance if a row in table 2 is within 10 miles of a location in table 1, it would be assigned to that location. I would also want to allow the rows of table 2 to be assigned to multiple locations in table 1 in case of any overlap. Both tables have complete address fields that have been recognized and found via google maps.

Can this be done? and if so how?
This topic has been closed for replies.

  • Quickbase Alumni
  • July 21, 2017
First, I would say that you would need a 3rd Table that would hold the connected records between Table 1 and Table 2. The 3rd Table will allow you to have connections to records in Table 1 from Table 2. 

Second, Quick Base doesn't have anything built in that will determine the distance between 2 points. To do this, you will need some type of script that would do a comparison of all records in Table 1 to those in Table 2, determine the distance between them, and then create a record in Table 3 if the distance meets your specified criteria. You may be able to build something like this using Zapier or Workato, but I've never attempted distance calculations in either of them.

  • Quickbase Alumni
  • July 21, 2017
Patrick, 

Im curious, what are the items in table 1 and table 2?

  • Author
  • Quickbase Alumni
  • July 21, 2017
Matthew,

Table 1 would be a list of locations by address. Table 2 would be a list of individuals along with their home address.

The goal is to be able to separate all the individuals from Table 2 and assign them to the locations in Table 1 based upon their proximity from one address to the other.