Discussions

Expand all | Collapse all

Autofilling values from parent table to child table

  • 1.  Autofilling values from parent table to child table

    Posted 03-29-2017 16:02
    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!


  • 2.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-29-2017 16:05

    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?



  • 3.  RE: Autofilling values from parent table to child table

    Posted 03-29-2017 16:13
    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?


  • 4.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-29-2017 16:47

    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.



  • 5.  RE: Autofilling values from parent table to child table

    Posted 03-29-2017 16:55
    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?


  • 6.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-29-2017 16:58
    You will import into the Parent Customers table. You are correct that the lookups will update automatically into the related Projects table's records.


  • 7.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-29-2017 17:05
    Yes, they will show as Text ( lookup ) not as Address data type.


  • 8.  RE: Autofilling values from parent table to child table

    Posted 03-29-2017 17:09
    I'm not 100% sure that projects is the child of customers, but the customer name, email, phone #, etc. auto populates when I click a button on the customer table to create a new project. I added the address fields in the relationship page, but they aren't auto populating when I click the create project button.


  • 9.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-29-2017 17:13

    Yes, Project is child to Customers. Your provided screen shot is the evidence of that. Are we certain that all the Address components are all populated in the Customer records?



  • 10.  RE: Autofilling values from parent table to child table

    Posted 03-29-2017 17:20


    Then on the same page, down below to create a project from the customer table...



  • 11.  RE: Autofilling values from parent table to child table

    Posted 03-29-2017 17:21
    Are you saying I need to include street 2 and country?


  • 12.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-29-2017 17:24

    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.



  • 13.  RE: Autofilling values from parent table to child table

    Posted 03-29-2017 20:25
    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.


  • 14.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-29-2017 20:35
    I will test in one of my apps. The screen shot is not present BTW.


  • 15.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-29-2017 20:58

    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.




  • 16.  RE: Autofilling values from parent table to child table

    Top
    Contributor
    Posted 03-30-2017 05:05
    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)


  • 17.  RE: Autofilling values from parent table to child table

    Posted 03-30-2017 16:52
    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.


  • 18.  RE: Autofilling values from parent table to child table

    Silver
    Contributor
    Posted 03-30-2017 16:54
    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?


  • 19.  RE: Autofilling values from parent table to child table

    Posted 03-31-2017 15:42
    Give me a call 6038564214