Help

How to create an automation to update a linked record field without overwriting data?

Topic Labels: Automations
Solved
Jump to Solution
393 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Aysia_Saylor
6 - Interface Innovator
6 - Interface Innovator

Hello,

Apologies if this has already been posted somewhere, but I'm trying to create an automation that updates a linked record field without overriding the existing data. 

I have two tables:

  • Table A - Contains document records
  • Table B - Contains a list of role records 

I have a linked record field called "Role(s)" in Table A that I'm using to associate documents to their appropriate roles from Table B.

I want to create an automation that automatically assigns certain records from Table B to the linked record field in Table A without overriding any existing data (only adding to it).

  • Example: I link the "Inventory Associate" and "Production Associate" records to the Role(s) field. I want to automatically link their supervisory roles ("Inventory Supervisor" and "Production Supervisor") as well without affecting other data that may be present in that cell.

I set up a test automation with the following triggers and actions: 

  • Trigger: When a record matches conditions: Role(s) is any of "Production Associate"
  • Action: Update record in Role(s) with "Production Supervisor"

This works, but this cell may also have other role associations (e.g., Inventory Associate), so I wouldn't want that data to be overwritten. I've also experimented with the following triggers and actions:

  • Trigger: When a record matches conditions: Role(s) contains "Associate"
  • Action: Update record in Role(s) with "Supervisor" 

The problem with this is that the system doesn't know which supervisors to add without specifying which associate-level positions, so it would add all supervisors. 

We have hundreds of these associate-level roles, so I'm trying to find a way to do this without creating separate automations/triggers/views for every rule. If there isn't a way to achieve this within the automation, perhaps there's a way I can associate the records to one another in the tables and then connect that somehow to the automation? 

Thanks in advance

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

re: We have hundreds of these associate-level roles, so I'm trying to find a way to do this without creating separate automations/triggers/views for every rule.

Ahh yeah, you should definitely associate the records to one another in the "Roles" table like you said, and so you should end up with something like this:

Screenshot 2024-02-29 at 10.36.09 AM.png

After that, you could create a lookup in your 'Documents' table to display the associated roles, and then use a formula field to combine them.  You can then use an automation to paste the value from the formula field into the linked field, and so it'd look like this all together:

Screen Recording 2024-02-29 at 10.35.07 AM.gif

Link to base

See Solution in Thread

4 Replies 4

For the update records action:

The hidden secret trick for making this work is to insert your brand new value into the field first, then type a comma, then insert the field itself after the comma.

Thank you! I tried following the suggestion, but I got the error "Field cannot accept the provided value: Could not find matching rows for string." 

I verified the values matched the ones used in the linked record (I populated the automation by copy/pasting the values directly from the linked record field) and retested the triggers, but I keep getting the same error 

TheTimeSavingCo
18 - Pluto
18 - Pluto

re: We have hundreds of these associate-level roles, so I'm trying to find a way to do this without creating separate automations/triggers/views for every rule.

Ahh yeah, you should definitely associate the records to one another in the "Roles" table like you said, and so you should end up with something like this:

Screenshot 2024-02-29 at 10.36.09 AM.png

After that, you could create a lookup in your 'Documents' table to display the associated roles, and then use a formula field to combine them.  You can then use an automation to paste the value from the formula field into the linked field, and so it'd look like this all together:

Screen Recording 2024-02-29 at 10.35.07 AM.gif

Link to base

Thank you! 🙂