Skip to main content
Solved

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


Forum|alt.badge.img+8

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

Best answer by TheTimeSavingCo

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:

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:

Link to base

View original
Did this topic help you find an answer to your question?

4 replies

ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8759 replies
  • February 28, 2024

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.


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • 15 replies
  • February 28, 2024
ScottWorld wrote:

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
Forum|alt.badge.img+28

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:

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:

Link to base


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • 15 replies
  • February 29, 2024
TheTimeSavingCo wrote:

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:

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:

Link to base


Thank you! 🙂


Reply