Autofilling values from parent table to child table

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
I am taking over Quickbase for my predessessor at my place of employment. I'm not up to speed with how it all works. Currently, admin creates a customer field once a sale is made. They input information into the form and then press a button on this form after inputting info about the customer. The button creates a project that autofills information from the customer field into the project field. What I'm trying to do is change the address field in the child table projects. Before, the customer's address was autofilled into projects, but it was put into a text type field, I wanted to change it to an address field so that I can create a map report for all our customers. My question is how to I customize the table to table relationship so that the address from the customer table is auto populated to the address field in projects. I wouldn't be surprised if someone needs more info before they could assist. Thanks in advance!
Photo of Evan Leith

Evan Leith

  • 170 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

You'd probably want to 'replace' the address fields in Projects with Lookup fields from the parent Customer table.

Do you know how to bring Lookup fields into a child table from a parent table?

Photo of Evan Leith

Evan Leith

  • 170 Points 100 badge 2x thumb
So I added an address type field in projects, you're saying that I should add a lookup type field? Or is that just the lookup field in the table to table relationship page?
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

You would want to open the table to table relationship interface. Click on any of the two tables' tab at the top of your application. Click the Settings link at the top left lying just underneath the HOME button.

On the Settings page, click on Table to Table Relationships.

On the next page, under the Relationship column, click the table pair to modify. It will probably be declared as, Customer >> to >> Projects.

In the relationship interface for these two tables, on the right-hand side is the child. There is a button at the bottom of the child column, "Add Lookup fields". Click this button.

On the page that follows, you're able to select up to three Parent fields at one time to be brought over into the child table. Select the Address fields.

The ADDRESS Data Type:

You did mention wanting to use Google maps and so therefore, you want to be sure you have in the Customer table the Address data type for your address fields.

The Address data type is broken up into six parts by QuickBase. [Address Field Name]: City; [Address Field Name]: Country; [Address Field Name]: Postal Code; [Address Field Name]: State/Region; [Address Field Name]: Street 1; [Address Field Name]: Street 2.

You'd have to import into each of these as separate columns of data if you do not already have this data type established.

Let us know where you are so far.

Photo of Evan Leith

Evan Leith

  • 170 Points 100 badge 2x thumb
So I'm following, but when I import those, they're showing up as a text type. The fields in both customer table and project table are for sure address type. Will it just show up as text lookup but autofill it into the address type field in projects?
Photo of Evan Leith

Evan Leith

  • 170 Points 100 badge 2x thumb
Are you saying I need to include street 2 and country?
Photo of Chris

Chris, Champion

  • 4,380 Points 4k badge 2x thumb

When you click into the address lookup portion of the Address data field ( the first text area that has a magnifying glass at its far right ) Google will take what is typed in there and populate the Address field components. If Google does not populate that, you do not need to either.

Photo of Evan Leith

Evan Leith

  • 170 Points 100 badge 2x thumb
This is a screenshot on the customers table, it is blank when I click the "add projects" button and go to the new project table, but the information like name, phone#, email, etc. do auto populate.
Photo of Chris

Chris, Champion

  • 4,380 Points 4k badge 2x thumb
I will test in one of my apps. The screen shot is not present BTW.
Photo of Chris

Chris, Champion

  • 4,380 Points 4k badge 2x thumb

Evan,

I have created the association in a test database with the Address data type and bringing in 1 to 3 lookup fields -- components of the Address field data type  -- and it was successful.

I'd like to suggest deleting the lookup fields from the child table and bring in the Address data type components as lookups again.

Be certain that you are using the Address data type in Customers for the address information, and not just regular text fields.

You can use just the one main Address field component as a test of this effort, the one that does the Google search.

I feel that you may have some junk lookup fields in the child table. Click the + sign next to the lookup field and see if there is an associated Related Customer Address field that goes with it.


Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
Looking at your customer record, you have the address field type.  But in your relationship list, you don't have the address field.  (You have the individual components)

Simply add a new lookup field to the relationship, select the field "Address".  That will bring the entire address as a link to the project table.

Then you can create map reports (per your original question)
Photo of Evan Leith

Evan Leith

  • 170 Points 100 badge 2x thumb
I don't understand how it is linking the information from the address? Does it have to be a proxy look up? Does the field name in projects have to be exactly the same as it is in customers (address)? Currently: Customers - Address, Projects - Customer Address.
Photo of Chris

Chris, Champion

  • 4,380 Points 4k badge 2x thumb
No, the spelling does not have to be exactly the same. The lookup 'borrows' the same value from the parent, they're not two distinct values. Can you let one of us in your app to have a look?
Photo of Evan Leith

Evan Leith

  • 170 Points 100 badge 2x thumb
Give me a call 6038564214