Add Record Action in Rules

I am trying to add a new record from a rule. I thought that “Copy Field Value(s)” would do this, but that overwrites every record.

So, what I want is a new Action - “Add Record and Copy Field Value(s)”

Could that be done?

Simon

Hi Simon,

I had something similar to this, maybe this can help you?

1. Create a new event.

2. Create a new rule and within the trigger tab set ‘Source’ to event and ‘Event’ to the event you created.

3. Within the response tab, set ‘Scope’ to Individual records, ‘Action’ to Duplicate record(s) and ‘Property copy scope’ to either All or Selective (depending if you want to copy only a few fields).

4. Within the page builder on the page you want to trigger the event from, add a ‘Form’ widget with the element ‘Action link’.
page%20builder%20-%20form

5. Click on the ‘Action link’ and go to the Settings tab within the sidebar and change ‘Action’ to trigger event and select the event you created

Hopefully this is what your looking for.

Liam

Thanks, but that’s not quite what I want I’m afraid, I need to copy from and object (with a 1-1 relationship to a Job) to a 1-many history object.
.
What happens is that all of the existing objects get overwritten whereas I just want to add a new history object.

Hi Simon,

When using the “Copy field value(s)” rule action to copy data into a to-many relation, by default the behaviour will be to add a new child relation with the copied data. It will not override the data in your existing child relations.

If there is something about your Build Studio configuration that causes you to observe the behaviour you describe, you could do it more “safely” in two rules:

  1. Action “Add relation” - Just create an empty history record
  2. Action “Copy field value(s)” - On creation of a history record, pull the data from the parent record into its own history record.
    The second rule action would immediately follow the first.

Before trying this alternative, I’d recommend trying to understand exactly what is overwriting your data. The detective log can be a great help in this.

Let us know if your issue remains unresolved.