Using a formula to add people to a people column without overwriting

Hi there, I have a button that’s meant to duplicate a row in a table and share it with a person that’s selected in a “Share with” column. The formula attached to the button transfers a person’s name from a “Share with” column in the first column to a “Shared” column in the new row:

runactions(Ideas.addrow(Ideas.Idea,thisRow.Idea,Ideas.Image,thisRow.Image,Ideas.Tags,thisRow.Tags,Ideas.Source,thisRow.Source,Ideas.[Disco owner],thisRow.[Share with], Ideas.[Share with],""),thisRow.ModifyRows(Ideas.Viewers,thisRow.[Share with]),thisRow.ModifyRows(Ideas.[Share with],""))

Currently, the button formula overwrites the person value in the “Shared” column if the row has already been shared. But I would like to share it with additional people so that multiple people appear in the “Shared” column (rather than overwriting what’s there). Any idea how to tweak this formula (or column setting) so that I don’t overwrite the individual in the “Shared” column, and instead add additional people?

Hey there!

Any chance you can share the doc or an example? That would make it much easier to help!

My initial idea without seeing the doc is that you will modify that row with the new person you are sharing it with AND the person already in that column.

Think of it like this: instead of adding a new value to an already populated column, access that columns value in your formula and then overwrite the column with your new data which will include both the old value and the new value.

Actually, I think I fixed the issue using a listcombine function. I was able to tweak it so that it combines what’s in the current people column with the person I was adding:

runactions(Ideas.addrow(Ideas.Idea,thisRow.Idea,Ideas.Image,thisRow.Image,Ideas.Tags,thisRow.Tags,Ideas.Source,thisRow.Source,Ideas.[Disco creator],thisRow.[Share with], Ideas.[Share with],""),thisRow.ModifyRows(Ideas.Viewers,listcombine(thisRow.Viewers,thisRow.[Share with])),thisRow.ModifyRows(Ideas.[Share with],""))

1 Like