Re: Take data from one record to populate fields in another if a linked field is selected

399 0
Showing results for 
Search instead for 
Did you mean: 
7 - App Architect
7 - App Architect

I have a database of things, which all have measurements. Sometimes one item will share parts with another item.

I was wondering if I could take the measurements from one item (which is a linked field) and populate the measurements fields in the variant item.

Basically, when someone is filling out the form view and they select a record to reference (which is a linked record, as they can only add already created records from a dropdown), it will take the measurements from that linked record and add it to the record that is currently being created.

Record one:
Car Name 1
Car Body 1
Car Measurements 1 (separate fields for height, width, length)

Record two:
Car Name 2
Linked record to “Car Body 1” (because they have the same body)
Measurements auto-populated from “Car Measurements 1” into the blank height, width, length fields.

1 Reply 1

This can definitely be done with the right setup. First, add a series of rollup fields to pull in the values from the linked record into the new record. I recommend a rollup over a lookup because a lookup field returns an array, whereas the rollup field allows you to process the array of incoming data with an aggregation formula and output a single value (number, string, etc.). For example, to bring in the height of a linked car body, the rollup would use the link field to collect data from the {Height} field of the linked record, with SUM(values) as the aggregation formula. Repeat as needed for the other values that you want to copy over. I’ll call this rollup field {Height Copy}.

Moving those copied values could be done using an automation. The trigger would be “When record matches conditions”, with the condition being that the linked record field is not empty. The only action would be an “Update record” action set to update the same record that triggered the automation. For the fields to update, you’ll populate each main field with the value from its associated copy rollup field; e.g. the value of {Height Copy} will go into the {Height} field.