Wax on, Wax off. Working with multi-selectors (tags)

I’m setting up a tagging system for my task table. The tags are stored in it’s own table.

I tried to make two table buttons in Tasks which can add or delete a tag from a task based on a lookup block. It almost work, but I have some issues as Coda is mixing “blank” and empty, and it doesn’t seem to follow me. I guess this has something to to with the way I process the list.
So I would really appreciate som help on these formulas

image

This is my formulas for the buttons:

Tag On button:
ModifyRows(thisRow,thisRow.Tag,(ListCombine(thisRow.Tag,[Lookup Tag])))

Tag off button:
ModifyRows(thisRow,thisRow.Tag,thisRow.Tag.Filter(thisRow.Tag!=[Lookup Tag]))

And here is the example page: Tag-system · Test-area LKA

I know I will need checks for an empty list, but I made the examples as simple as possible.

I seems to me that the Coda formulas having trouble with blanks and empty for lists and multiple selecting in general. It sometimes mix up an lookup value and a text value. So it’s an area which I find a bit messy.

Hi @Lars_Kristian_Aasbrenn, I took a look at your example and curious how you figure out which tag to remove or add to the Tag column? Currently the Tag column content data column references the Tag column, and the buttons reference the Tag column content data column. So it appears to be a circular reference.