Action: Remove one record from a list of linked records

I’m trying to build a “Pin” functionality for ToDo Items.
Basically a logged in user can pin a todo item so its shown on a “pinned only” view. Its done via record buttons.

So far i set up a Linked field in my ToDo Table where you can add users. Once a user is added to this field, the todo item is pinned for him.

Now the problem arises if multiple users want to pin the same todo item. From what I understand, the “Update Record” action can only overwrite the entire content of a linked field.

Is there any way to have the action be Add/remove User A from List of linked Users without touching the rest of the List?

I would resort to Airtable scripts but I want to use Nolocos Record Buttons so that doesn’t really seem to work either.

Is there a way to do this natively that i’m not seeing ?

Just thinking out loud here @_4N, but would it make sense to do this the other way around?

i.e. have a “Pinned” column on the User table instead so this way multiple users can pin the same to-do without the overwriting?

2 Likes

To follow up on @dohloco suggestion, if 1. the linked field is a multi-value field, 2. the button is set to one click, and 3. the user ID is set as hidden in the field, it will work like a toggle to add/remove the user to pin the item without overwriting the other values.

2 Likes

I have a similar use case but I could not understand the workaround. You suggest having a Pinned column in Users table (which can have many ToDo items) and an automatically created Users column in the ToDo table (which can be related to multiple Users). I cannot link/unlink a ToDo item to a User via record buttons or workflows. There is only option to update the field in one table or the other, and that overwrites the previous many to many relationships no matter which table we play on. Am I missing something?

Ok finally time to respond here!

@dohloco hmm I mean what you’re describing is the same thing but looking at the User table instead of the ToDo Table, no?
In the ToDo Table its the field “Pinned at User”
In the User Table its the Field “pinned Tickets”

Anyways, I didn’t know that if you add an Record ID in a Hidden field within the Action Buttons, it acts as a toggle. It now works as planned, thanks @carlos.

2 Likes