Automation to add a collaborator (without overwriting the existing data)
Hello! I’m trying to create an automation that allows me to add someone to a collaborator field without replacing any data that is already in the field. Is this possible?
That is, if 3 people are already in the collaborator field and I want to add a fourth via an automation, can the fourth be added without removing the other 3 that are already in the field?
Page 1 / 1
I could be wrong about this (so somebody else may know of an easier way of doing this), but as far as I know, I don’t believe this is possible without either:
Does this look right? If so I’ve set it up here for you to check out
And here’s the automation setup:
Hey @ScottPhillips,
As shown by Adam above, this can be absolutely done by having two fields for Collaborators (e.g. Existing and New),
When updating the value of Existing via automation, you’ll want to: 1. actually map the already Existing value (from the trigger) on the Existing field 2. have a comma 3. map the New value (from the trigger)
i.e. “{Existing}, {New}”
For last, you can also update the New field to make it blank again!
I got this working just how I need it. Thanks again!
OK Adam, I have another one for you (similar to this question above) @TheTimeSavingCo .
I have 4 teams that are part of a larger team. And I’d like to have collaborator fields for each of the 4 teams. And I’m trying (unsuccessfully so far) to make an automation that will add those users, when added to any of the 4 collaborator fields, to a 5th collaborators field (where all collaborators can be seen in a single field).
So, whenever someone is added to “collaborator field 1”, “collaborator field 2”, “collaborator field 3”, or “collaborator field 4”, those users also get added to the “all collaborators” field.
And obviously not overwrite any users already in the “all collaborators” field.
Hm, I think you’d need a script for this I’m afraid. Does this look right? If so I’ve set it up here for you to check out
let {collaborator1, collaborator2, collaborator3} = input.config()
let collaborators = tcollaborator1, collaborator2, collaborator3].filter(Boolean)
output.set("collaborators", collaborators)
cool--thank you Adam! This will be my first foray into scripts, but I’ll use the base you made and go from there.
Honestly, I’m not all that worried about removing collaborators from the individual fields and then that being reflected in the combined field. I guess that would be a “nice to have.”
But what I do want is to be able to add additional users (manually) to the combined field--that may not be in the individual fields. And for those to obviously not be affected when people are added to the individual fields (and subsequently added to the combined field via the automation).
So I want to be able to:
add a user to any of ““collaborator field 1”, “collaborator field 2”, “collaborator field 3”, or “collaborator field 4” and have that user be added automatically to the combined field (and not remove any user already in that combined field)
add any user to the “combined field” manually (so that I can add people that aren’t part of the other 4 collaborator groups).
In the end, I’m setting up views/pages where the separate groups can see their collaborators, but I also want a view where ALL the collaborators can be seen (from one singular field).
Apologies for the long post @TheTimeSavingCo
Ah got it, how does this look?
Here’s the script, and I also updated the original base with it:
let {collaborator1, collaborator2, collaborator3, combined} = input.config()