Hi all,
I'm trying to find a way to create an automation that’ll inherit "Domain" field values from all Epics to their parent Initiative everytime the field values are updated or when the parent is changed.
I found a way to make it happen but there's an issue if the Initiative has 2 Epics or more under it: The values in the Initiative will stay as they are and the automation just adds the new values to it - But keeps the old values as well which are no longer relevant:

To solve this I tried to first clear the Initiative "Domain" values (every time the Epic's "Domain" field is changed) and re-fetch the values again - But then it only takes the values from the Epic that was modified (the trigger issue), so it's not working for me.
Another idea was to use a variable or lookupissues to get a list of all the Epics under the Initiative - capture the values of "Domain" from all of them - and then put them back in the Initiative. When I tried that I got the following error:
(Specify the value for Domain in an array (Domain))
Any idea how to get past this error?
here's what I tried:


